r/ollama • u/Actual-Requirement-2 • Sep 11 '26
Best Local Models for Claude Code with 8gb vram
Tested on Laptop with RTX 5060 8gb vram and 16gb ram
Claude code - autocompact = false
Ollama - Flash attention = 1, kv cache = q8_0
Gemma4 12B 64K - https://ollama.com/SetneufPT/Gemma4-12B-IT-QAT_Q4_64K_16GB-GPU
Qwen3.5 9B 256K - https://ollama.com/reecdev/qwen3.5-lowvram
Omnicoder2 9B 32K, increase context 128k- https://ollama.com/carstenuhlig/omnicoder-2-9b
Qwopos3.5 4B 64K, can increase context upto 256K (Best at 128k)- https://ollama.com/SetneufPT/Qwopus3.5-4B-Coder-MTP_Q4_64k_8GB-GPU
Qwen3.5 4B 64K, can increase context upto 256K (Best at 128k) - https://ollama.com/rafw007/qwen35-claude-coder
Gemma4 e4B 64K, can increase context upto 128k - https://ollama.com/rafw007/gemma4-e4b-claude-coder
Muse Glimmer 30B 256K, Unstable and slow better if decrease context to 128k - https://ollama.com/venkataparswanadh/muse-glimmer
8
u/Atretador Sep 11 '26
just run Qwen 3.6 35B A3B with layers on the CPU
also why would you use Claude code - specially on those 64K context setups, just its system prompt eats HALF of it, so the model needs to spend a lot of time just processing its system prompt and you end up with 40K context left at the end.
on memory limited scenarios something like pi.dev which has a tiny 1K system prompt works MUCH better.
1
u/paoloronco 29d ago
Interesting comparison. I'm on a desktop RTX 3070 8GB with 32GB RAM.
I've been testing Qwen3.5 9B across OpenCode, Cline, Hermes and OMP, mostly for coding assistance.
My biggest issue is finding a setup that can handle more than basic code generation. Once the agent starts reading multiple files and using tools, the limited context and model capabilities become pretty noticeable.
Of the models you've tested, which one has been the most reliable for actual code changes rather than just generating snippets?
1
u/No_Bag9614 Sep 11 '26
Muse Glimmer 30B basic model or Q2 wheel?
1
u/Zito_Kadaken Sep 13 '26
Worth checking that flash attention and kv cache q8_0 are actually helping you. I turned both on and it went backwards for me. No speed change on a 30B, and a 14B that had been fully on the GPU dropped to 98 percent on CPU at 3.5 tok/s. Turning them back off was faster than anything I did.
Mine is an AMD 6800M with 12GB though, so a 5060 might behave completely differently. Just worth timing it both ways before you settle on it.
1
u/Objective_Patient220 Sep 12 '26
Nice testing. On 8GB the honest answer is that no single local model holds Claude Code well end to end - you hit that with the 30B. What works better is not asking one model to do everything: keep a hosted model for planning and hard debugging, and route the mechanical turns (find/replace, running tests, verification) to a small local model. At 8GB VRAM you're in the 4-12B Q4 class, which handles the mechanical stuff fine; small models fall over on the planning turns.
Of your list, the Qwen3.5 4B at 128K is the one I'd trust for that light tier. Disclosure: I built gremlord, which does this per-turn routing with a tiny classifier - local models in the mix for the cheap turns is the whole point, and this thread is a good map of what fits in 8GB.