๐ฆ๐๐ป๐ฑ๐ฎ๐ ๐๐ผ๐ณ๐ณ๐ฒ๐ฒ & ๐๐ผ๐ฑ๐ฒ - ๐๐น๐ฎ๐๐ฑ๐ฒ ๐๐ผ๐ฑ๐ฒ ๐ง๐ฒ๐ฟ๐บ๐ถ๐ป๐ฎ๐น ๐ฎ๐ป๐ฑ ๐๐ผ๐ฐ๐ฎ๐น ๐๐ฒ๐บ๐บ๐ฎ๐ฐ (๐๐๐ฝ, ๐บ๐ผ๐ฟ๐ฒ ๐๐ฒ๐บ๐บ๐ฎ)
Not a lot of time this weekend so grab your coffee - this week mixed โ๐ค๐ข๐ฏ ๐๐ญ๐ข๐ถ๐ฅ๐ฆ ๐๐ฐ๐ฅ๐ฆ ๐ฅ๐ณ๐ช๐ท๐ฆ ๐ข ๐ญ๐ฐ๐ค๐ข๐ญ ๐ฎ๐ฐ๐ฅ๐ฆ๐ญ?โ (which, tbh, we know it could before starting) with โ๐ธ๐ข๐ต๐ค๐ฉ ๐ข 31๐ ๐ฎ๐ฐ๐ฅ๐ฆ๐ญ ๐จ๐ณ๐ช๐ฏ๐ฅ ๐ต๐ฐ ๐ข ๐ฉ๐ข๐ญ๐ต ๐ฐ๐ท๐ฆ๐ณ ๐ข ๐ค๐ฐ๐ฏ๐ต๐ฆ๐น๐ต ๐ธ๐ช๐ฏ๐ฅ๐ฐ๐ธ.โ (โฆ and a confession: I had tea today. Donโt tell the branding.)
Iโve been using Claude Code across Web, Windows, and Terminal modes (mostly Web), and after some airport lounge testing with a Gemma model on my laptop, I wanted to put the two together - Claude Code on my AWS server (g6.2xlarge), pointed at local Gemma4 models via Ollama.
The test case: a Code Audit prompt from GitHub (link at the bottom of the post - Roger Faught - is this your prompt? ), run against some old C code of mine - the same Unix program I used for earlier Gemma testing.
๐๐ถ๐ฟ๐๐, ๐๐ต๐ฒ ๐ฏ๐ฎ๐๐ฒ๐น๐ถ๐ป๐ฒ:
- Claude Code + GitHub CLI + Sonnet: it just ran. Full audit in about 6 minutes, consuming roughly 3% of my Pro subscription. Straightforward.
๐ง๐ต๐ฒ๐ป ๐๐ต๐ฒ ๐ณ๐๐ป ๐๐๐ฎ๐ฟ๐๐ฒ๐ฑ ๐๐ถ๐๐ต ๐น๐ผ๐ฐ๐ฎ๐น ๐บ๐ผ๐ฑ๐ฒ๐น๐:
- Gemma4:31b loaded onto the GPU fine (confirmed via
ollama ps), but then the usual num_ctx problem showed up. Bumping the context window to 128k - and 64k - split the model ~50/50 between CPU and GPU, and everything ground to a halt. - Dropped to gemma4:12b, pushed the context window back up to 128k, and it stayed fully on the GPU. Interesting detail: going from 64k to 128k num_ctx bumped memory consumption from 8.4GB to 9.5GB. The audit ran in about 10 minutes and produced risk-based recommendations on the codebase - success. (๐๐ต ๐ธ๐ฐ๐ถ๐ญ๐ฅ ๐ฃ๐ฆ ๐ช๐ฏ๐ต๐ฆ๐ณ๐ฆ๐ด๐ต๐ช๐ฏ๐จ ๐ต๐ฐ ๐ต๐ณ๐บ ๐ต๐ฉ๐ฆ 26๐ ๐๐ฐ๐ ๐ฎ๐ฐ๐ฅ๐ฆ๐ญ)
๐ช๐ต๐ฎ๐ ๐ ๐น๐ฒ๐ฎ๐ฟ๐ป๐ฒ๐ฑ:
- Ollama + Claude Code Terminal + GitHub setup is straightforward. Once the context window is sorted - thatโs been the recurring lesson with local models: num_ctx is almost always the first thing to check.
- There may be a real fit for local models in my workflow: use them for smaller, simpler scripts, and save the larger frontier models (and my subscription budget) for the work that actually needs them.
- Purpose achieved. The script ran, the audit completed, and Iโve got a working local option.
Curious how youโre drawing the line between subscription and local models with tools like Claude Code (Qwen Coder anyone?)
๐ ๐ด๐ผ๐ผ๐ฑ ๐ฆ๐๐ป๐ฑ๐ฎ๐ ๐ฎ๐ป๐ฑ ๐บ๐ ๐๐ฒ๐ฎโ๐ ๐๐๐ถ๐น๐น ๐๐ฎ๐ฟ๐บ.
- Code Audit prompt: GitHub Gist Link
- The C code under audit: GitHub - Menu Program
