A JOURNAL OF ARTIFICIAL INTELLIGENCE
my ai daily

Best Local LLM for Coding: Picks by 16GB, 24GB & 64GB

Autocomplete-only models crash inside Cline, Aider, and OpenCode. Filtering strictly for native Ollama tool calling and permissive open weights yields clear November 2026 picks across 16GB, 24GB/32GB, and 64GB+ workstations.

AI-generated editorial illustration displaying three ascending local workstation hardware tiers aligned left to right on a dark charcoal bench—a slim anodized laptop, a mid-size dual-fan GPU tower, and a tall brushed-aluminum workstation—linked by cyan and gold circuit rails.
AI-generated illustration / my ai dailyIllustrative image.

THE STORY IN THREE POINTS

  • Hardware picks with native tool calling: 16 GB machines run OpenAI’s Apache-2.0 gpt-oss-20b (~14 GB MXFP4, 3.6B active) or Google’s Gemma 4 12B (~8 GB, multimodal + 64K context headroom); 24 GB GPUs and 32 GB Macs center on Alibaba’s Apache-2.0 Qwen3.8-27B (~18 GB Q4_K_M, 256K context) or Qwen3-Coder 30B-A3B.
  • At 64 GB+ VRAM or Apple unified memory, Ricursive Intelligence’s Apache-2.0 Ripple-65B Preview (39 GB Q4_K_M / 46 GB NVFP4) and Alibaba’s 80B MoE Qwen3-Coder-Next (~52 GB) bring near-frontier multi-file refactoring onto a single studio box.
  • Before wiring any local pick into Cline, Aider, or OpenCode, raise Ollama’s default 4,096-token OLLAMA_CONTEXT_LENGTH to >=64K tokens and verify harmony/tool templates so agents do not silently truncate or reject tool calls.

The quick 3-tier verdict: why tool calling separates real agent models from toys

Most "best local coding LLM" lists fail the moment a developer plugs the winner into Cline, Aider, OpenCode, or Qwen Code: legacy code-completion models either lack structured tool calling altogether or break when handling multi-turn edit-and-test schemas. Applying the strict verification rubric from Aventail’s November 16 local coding audit—requiring native Ollama tool-calling tags, permissive open-weight licenses, and realistic context headroom—yields clear tier winners: gpt-oss:20b / gemma4:12b at 16 GB, qwen3.8:27b (or Qwen3-Coder 30B-A3B) at 24 GB GPU / 32 GB Mac, and ripple-preview:65b / Qwen3-Coder-Next at 64 GB+.

Keep one critical rule in mind from our workstation memory analysis and Ollama VRAM breakdown: an 18 GB weight file leaves almost no room for a 64K KV cache on a 16 GB laptop and fits tightly even on a 24 GB card, so always budget memory for weights plus context.

16GB VRAM & unified memory: gpt-oss-20b for speed, Gemma 4 12B for context & UI

If you want fast reasoning and terminal responsiveness inside 16 GB, VDF.AI’s 2026 coding benchmark roundup and Aventail both point to OpenAI’s Apache-2.0 gpt-oss-20b (ollama pull gpt-oss:20b). Because its sparse MoE design activates just 3.6B of 21B total parameters in native 14 GB MXFP4 weights (128K context, OpenAI-reported 60.7 on SWE-bench Verified at high effort), generation stays brisk—provided your client honors OpenAI’s mandatory harmony response format.

When 14 GB weights squeeze KV-cache capacity on a 16 GB laptop—or when your coding tasks include UI screenshots and audio notes—step to Google’s Apache-2.0 Gemma 4 12B (ollama pull gemma4:12b). At roughly 7.7–8.0 GB with native function calling, a 256K window, and Google-reported 72.0% LiveCodeBench v6 contest coding, Gemma 4 12B (alongside compact 9B distillations like mimo-v2.6:9b) preserves ample headroom for 64K agent context without CPU spillover.

24GB GPU / 32GB Mac: Qwen3.8-27B leads overall, Qwen3-Coder 30B-A3B maximizes speed

For an RTX 3090/4090 (24 GB VRAM) or 32 GB Apple Silicon Mac, Qwen3.8-27B (ollama pull qwen3.8:27b) stands out as the best all-round Apache-2.0 coding checkpoint. Weighing 18 GB at Q4_K_M (30 GB at Q8) with a 256K native window (262,144 tokens), native tool calling, and toggleable thinking, Qwen3.8-27B carries vendor-reported marks of 73.0 Terminal-Bench 2.1, 61.7% SWE-bench Pro, and 90.3 LiveCodeBench v6. On a 32 GB Mac it leaves clean room for deep repos; on a tight 24 GB GPU, use OLLAMA_KV_CACHE_TYPE=q8_0 or fall back to ~15 GB devstral-small-2:24b when long contexts push VRAM limits.

Developers prioritizing raw tokens-per-second throughput for rapid editor loops over dense 27B reasoning still turn to Alibaba’s 30B-A3B sparse MoE (Qwen/Qwen3-Coder-30B-A3B-Instruct / ollama pull qwen3-coder:30b, activating 3B per token), though newer Qwen3.8-27B has overtaken older 30B MoEs on complex multi-file debugging.

64GB+ workstations: Ripple-65B Preview and Qwen3-Coder-Next 80B

Workstations equipped with 64 GB–128 GB unified memory, dual 32 GB GPUs, or NVIDIA DGX Spark unlock dense 65B+ and 80B MoE reasoning locally. Covered in detail in our Ripple-65B architecture audit, Ricursive Intelligence’s Apache-2.0 Ripple-65B Preview (ollama pull ripple-preview:65b, 39 GB Q4_K_M / 46 GB NVFP4, 1M context spec, text-only with native tool calling) lists vendor BF16 preview scores of 80.52 Terminal-Bench 2.1, 76.5 SWE-bench Verified, and 61.42 SWE-bench Pro v1.0—noting that independent Terminal-Bench 4.1 validation and quantized drop-off remain unconfirmed.

If you prefer sparse MoE decoding speed over dense 65B compute on 64 GB GPUs or 96 GB Macs, JoinOasis’s 2026 workstation guide highlights Alibaba’s 80B MoE Qwen3-Coder-Next (~52 GB download). Remember not to confuse local weights with Ollama’s :cloud tags (such as Kimi K3.1 Pro or GLM-5.3), which proxy to remote servers rather than running offline.

Checklist before connecting Cline, Aider, OpenCode, or Qwen Code

Regardless of which checkpoint you pull, the #1 cause of broken local coding sessions is Ollama’s 4,096-token default on sub-24 GiB machines: follow our Ollama context length fix guide to raise OLLAMA_CONTEXT_LENGTH to at least 64000 and verify via ollama ps.

Pair that window with git-disciplined workflows from our Aider vs Claude Code comparison and check how local models stack up against hosted harnesses on our Coding Agent Index.

Sources: Best local LLMs for coding: 10 models by memory tier|Aventail ↗ Best Local LLM for Coding in 2026: 10 Models Compared|VDF.AI ↗ 5 Best Local LLMs for Coding in 2026: Hardware & Setup|JoinOasis ↗ google/gemma-4-12b-it Model Card|Hugging Face ↗ ricursiveAI/Ripple-65B-Preview Model Card|Hugging Face ↗ Qwen/Qwen3-Coder-Next Model Card|Hugging Face ↗

THE BROADER CONTEXT · FRONTIER LABS DOSSIER

Explore full product specifications, pricing analysis, and continuous coverage in the Frontier Labs Desk Hub and Qwen Dossier. Independent benchmarks available on the AI Intelligence Index and Coding Agents Leaderboard.

02The next story

News

Ollama Context Length: Why It Caps at 4K & How to Fix It

Ollama silently locks context at 4,096 tokens on machines under 24 GiB VRAM—and setting OLLAMA_NUM_CTX or passing num_ctx to /v1/chat/completions does nothing. Here is the OLLAMA_CONTEXT_LENGTH fix and how to verify it with ollama ps.

ComfyUI Out of Memory Fix: DynamicVRAM & Batch Leaks

ComfyUI’s 2026 DynamicVRAM and AIMDO allocator made pre-March --lowvram flags useless—introducing second-run non-OOM crashes, WSL Shared GPU memory locks, and HostBuffer errors. Here is the symptom-by-symptom CLI and BatchPipe fix.

OpenClaw Alternatives: Safer Self-Hosted AI Agents Tested

OpenClaw passed 361K+ GitHub stars—and Bitsight spotted over 30,000 exposed instances probing port 18789. Here is how security-first open replacements like Hermes Agent, NanoClaw, NullClaw, and OpenFang compare against managed sandboxes like Claude Duet and Manus.

Follow your curiosity.

EXPLORE THE ARCHIVESOURCES & CONTEXT INCLUDED