<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fernando Nogueira</title>
    <description>The latest articles on DEV Community by Fernando Nogueira (@fernandonog).</description>
    <link>https://dev.to/fernandonog</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F187992%2Fb67ba42d-caa1-4de9-9dfc-46769f583721.jpeg</url>
      <title>DEV Community: Fernando Nogueira</title>
      <link>https://dev.to/fernandonog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fernandonog"/>
    <language>en</language>
    <item>
      <title>5 Coding Models You Can Actually Run on a Laptop in 2026</title>
      <dc:creator>Fernando Nogueira</dc:creator>
      <pubDate>Tue, 04 Aug 2026 11:42:14 +0000</pubDate>
      <link>https://dev.to/fernandonog/5-coding-models-you-can-actually-run-on-a-laptop-in-2026-2he6</link>
      <guid>https://dev.to/fernandonog/5-coding-models-you-can-actually-run-on-a-laptop-in-2026-2he6</guid>
      <description>&lt;h1&gt;
  
  
  5 Local Coding Models I Keep Installed in 2026
&lt;/h1&gt;

&lt;p&gt;I still use cloud APIs for genuinely hard problems, but a lot of my day-to-day coding work has moved to models running on my own machine. Latency is lower, nothing leaves my laptop, and once a model is loaded the incremental cost is basically zero.&lt;/p&gt;

&lt;p&gt;The surprise is that small models are now good enough for real work. With 4-bit quantization and newer distillation techniques, a laptop with 16–32 GB of RAM can run models that handle refactoring, scaffolding, debugging, and code review without calling an API.&lt;/p&gt;

&lt;p&gt;These are the five models I currently keep around.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Qwen2.5-Coder — the default recommendation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct" rel="noopener noreferrer"&gt;Qwen2.5-Coder 32B Instruct&lt;/a&gt; is the most polished open coding family I have used. The family also includes &lt;a href="https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct" rel="noopener noreferrer"&gt;7B&lt;/a&gt; and &lt;a href="https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct" rel="noopener noreferrer"&gt;14B&lt;/a&gt; variants, all with a 131K context window.&lt;/p&gt;

&lt;p&gt;The 14B version at 4-bit uses roughly 7–8 GB for the weights alone. Add the OS, KV cache, and whatever browser tabs you have open, and 16 GB of total system RAM is the realistic floor. It responds fast enough to stay in flow and handles Python, TypeScript, Java, shell scripts, and config files competently.&lt;/p&gt;

&lt;p&gt;The 32B version is stronger at architecture-level reasoning, but the weights alone need 16–18 GB at 4-bit. You want 32 GB of system RAM or a GPU with 20 GB+ of VRAM to run it comfortably.&lt;/p&gt;

&lt;p&gt;What makes it the safe default is the ecosystem: ready-to-use GGUF and AWQ quants, usable tool-calling, and a large community keeping it current.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; daily coding, autocomplete, small refactors, unit tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; 131K tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; 8 GB total RAM for 7B; 16 GB for 14B; 32 GB or a modern GPU for 32B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it with:&lt;/strong&gt; &lt;a href="https://ollama.com/" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;, &lt;a href="https://lmstudio.ai/" rel="noopener noreferrer"&gt;LM Studio&lt;/a&gt;, &lt;a href="https://github.com/ggerganov/llama.cpp" rel="noopener noreferrer"&gt;llama.cpp&lt;/a&gt;, or &lt;a href="https://github.com/vllm-project/vllm" rel="noopener noreferrer"&gt;vLLM&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. DeepSeek-R1-Distill-Qwen-14B — for the weird bugs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" rel="noopener noreferrer"&gt;DeepSeek-R1-Distill-Qwen-14B&lt;/a&gt; is a distilled version of DeepSeek-R1. It was trained on long chain-of-thought traces, so it "thinks out loud" before answering. The family also includes &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" rel="noopener noreferrer"&gt;1.5B&lt;/a&gt;, &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B" rel="noopener noreferrer"&gt;7B&lt;/a&gt;, and &lt;a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B" rel="noopener noreferrer"&gt;32B&lt;/a&gt; variants, all with a 128K context window.&lt;/p&gt;

&lt;p&gt;That makes it slower and more verbose than Qwen2.5-Coder, but it is the model I reach for when a bug is subtle or when I need a careful code review. It catches edge cases in concurrent code, state machines, and algorithmic logic that smaller or narrower models miss.&lt;/p&gt;

&lt;p&gt;The trade-off is real: reasoning traces consume context and increase time-to-first-token. I keep prompts short and use 4-bit quantization. The 14B version needs roughly the same memory as Qwen2.5-Coder-14B: 7–8 GB for weights, 16 GB total RAM to be safe.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; debugging, reasoning-heavy tasks, careful reviews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; 128K tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; 16 GB total RAM for 14B; 8 GB for 7B; 32 GB or GPU for 32B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it with:&lt;/strong&gt; Ollama (&lt;code&gt;ollama run deepseek-r1:14b&lt;/code&gt;), LM Studio, or &lt;a href="https://github.com/kvcache-ai/ktransformers" rel="noopener noreferrer"&gt;KTransformers&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Phi-4 14B — the efficient generalist
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/microsoft/phi-4" rel="noopener noreferrer"&gt;Phi-4 14B&lt;/a&gt; from Microsoft is trained on synthetic textbooks, filtered web, and reasoning data. It is not a code-only model, but it is useful for tasks that need concise, well-structured output.&lt;/p&gt;

&lt;p&gt;I use it for JSON generation, quick scaffolding, CLI wrappers, and explaining existing code. It is less creative than Qwen2.5-Coder on open-ended prompts, but more disciplined when the task is well-defined.&lt;/p&gt;

&lt;p&gt;At 4-bit the weights take roughly 7–8 GB. It is one of the lighter 14B-class models to run without a GPU, but I would still want 16 GB of total system RAM for a smooth experience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; structured output, scaffolding, explaining code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; 16K tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; 16 GB total RAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it with:&lt;/strong&gt; Ollama, LM Studio, or vLLM.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Bonsai 27B — the one that changes the size math
&lt;/h2&gt;

&lt;p&gt;Most local models feel like a compromise: smaller, but weaker or slower. &lt;a href="https://huggingface.co/collections/prism-ml/bonsai-27b" rel="noopener noreferrer"&gt;Bonsai 27B&lt;/a&gt; is the first model I tested that made me question whether the compromise is still necessary.&lt;/p&gt;

&lt;p&gt;Prism ML distilled a Qwen3.6-27B-class teacher into mostly 1-bit and ternary weights. The result is a ~3.9 GB file that still scores well on coding benchmarks. The trick is that the student was trained inside the low-bit alphabet from the start, not compressed after training.&lt;/p&gt;

&lt;p&gt;It is not as polished as Qwen2.5-Coder for everyday use, and the tooling ecosystem is smaller. But it proves that local coding assistants can shrink dramatically without collapsing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; testing the frontier of tiny local models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; long context window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; 8 GB total RAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it with:&lt;/strong&gt; Prism ML's own tools or the Bonsai-compatible forks of llama.cpp and MLX.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. GLM-4-9B-Chat — when the context is not English
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/THUDM/glm-4-9b-chat" rel="noopener noreferrer"&gt;GLM-4-9B-Chat&lt;/a&gt; from Z.ai is a dense 9B model with strong multilingual support and a 128K context window. It is not the strongest pure coder here, but it is the most useful when I am reading documentation, comments, or issues in languages other than English.&lt;/p&gt;

&lt;p&gt;The long context is also handy for dropping a larger file or a small module into the prompt without aggressive trimming. At 4-bit the weights use roughly 4.5–5 GB, so 8 GB of total RAM is enough for light use.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; multilingual work, long-context reading, lighter coding tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; 128K tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; 8 GB total RAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it with:&lt;/strong&gt; Hugging Face Transformers with &lt;code&gt;trust_remote_code=True&lt;/code&gt;, vLLM, or LM Studio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I pick one
&lt;/h2&gt;

&lt;p&gt;My workflow is simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick edits and autocomplete:&lt;/strong&gt; Qwen2.5-Coder 14B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weird bug or careful review:&lt;/strong&gt; DeepSeek-R1-Distill-Qwen-14B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured JSON or a small script:&lt;/strong&gt; Phi-4 14B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curiosity or limited bandwidth:&lt;/strong&gt; Bonsai 27B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-English context or long file:&lt;/strong&gt; GLM-4-9B.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One model rarely does everything, so I keep a few loaded for different jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  A realistic note on memory
&lt;/h2&gt;

&lt;p&gt;The numbers above are weight sizes. At 4-bit, each billion parameters needs roughly 0.5 GB of storage. But running a model also needs space for the KV cache, activation buffers, and your operating system. Context length matters: a 131K context consumes far more KV memory than a 4K context.&lt;/p&gt;

&lt;p&gt;That is why the practical minimums are higher than a naive calculation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7B–9B models: 8 GB total RAM is the realistic floor.&lt;/li&gt;
&lt;li&gt;14B models: 16 GB total RAM is the realistic floor.&lt;/li&gt;
&lt;li&gt;27B–32B models: 32 GB total RAM or a dedicated GPU is much safer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your machine is tight on RAM, use a smaller context window and close other apps. Offloading to disk works in a pinch, but it is slow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am watching next
&lt;/h2&gt;

&lt;p&gt;The most interesting question right now is not whether 14B models can code — we already know they can. It is whether extreme compression can push 27B-class quality into a 3–4 GB package without destroying reasoning. Bonsai 27B is the first convincing case. If that recipe spreads to other coding models, the hardware floor for local assistants drops again.&lt;/p&gt;

&lt;p&gt;I wrote a &lt;a href="https://fernando-nog.netlify.app/can-a-3-9-gb-model-really-code-testing-bonsai-27b-1-bit-on-a-laptop/" rel="noopener noreferrer"&gt;hands-on post about running Bonsai 27B for coding&lt;/a&gt; on my own technical blog, including what worked, what did not, and why I think it matters.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you are running local coding models, what is in your rotation?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>qwen</category>
      <category>bonsai</category>
    </item>
    <item>
      <title>How Prism ML Squeezed a 27B Model Into 3.9 GB</title>
      <dc:creator>Fernando Nogueira</dc:creator>
      <pubDate>Tue, 04 Aug 2026 09:26:03 +0000</pubDate>
      <link>https://dev.to/fernandonog/how-prism-ml-squeezed-a-27b-model-into-39-gb-411l</link>
      <guid>https://dev.to/fernandonog/how-prism-ml-squeezed-a-27b-model-into-39-gb-411l</guid>
      <description>&lt;h1&gt;
  
  
  How Prism ML Squeezed a 27B Model Into 3.9 GB
&lt;/h1&gt;

&lt;p&gt;Most of us assume that useful AI needs a data center. The bigger the model, the better the reasoning — and the larger the bill. Prism ML's Bonsai 27B is a quiet counterexample: a 27B-class model distilled into binary and ternary weights, small enough to run on a laptop or even a phone, while keeping 89.5% of its full-precision reasoning.&lt;/p&gt;

&lt;p&gt;I wrote a full technical walkthrough on my blog, but here is the short version of how the compression pipeline works and why it matters for developers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post is a summary. The full article lives at &lt;a href="https://fernando-nog.netlify.app/bonsai-distillation-explained-from-qwen36-27b-to-a-phone-friendly-39-gb-model/" rel="noopener noreferrer"&gt;https://fernando-nog.netlify.app/bonsai-distillation-explained-from-qwen36-27b-to-a-phone-friendly-39-gb-model/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the same architecture, represent weights differently
&lt;/h2&gt;

&lt;p&gt;Bonsai 27B begins as &lt;strong&gt;Qwen3.6-27B&lt;/strong&gt;, a 27.3B parameter hybrid-attention model. Prism ML did not redesign the transformer. Instead, they changed how the weights are stored.&lt;/p&gt;

&lt;p&gt;Two formats ship today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-bit&lt;/strong&gt;: each weight is either &lt;code&gt;-1&lt;/code&gt; or &lt;code&gt;+1&lt;/code&gt;, plus a shared scale per 128 weights. Effective bit width: ~1.125. File size: ~3.9 GB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ternary&lt;/strong&gt;: each weight is &lt;code&gt;-1&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, or &lt;code&gt;+1&lt;/code&gt;, with the same shared-scale trick. Effective bit width: ~1.71. File size: ~7.2 GB.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ternary variant is the sweet spot for laptops; the 1-bit variant is the one that fits a phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The key trick: train the student while it is already quantized
&lt;/h2&gt;

&lt;p&gt;Conventional quantization takes a trained model and rounds its weights afterward. That works at 4 bits. Below 4 bits, reasoning quietly collapses.&lt;/p&gt;

&lt;p&gt;Bonsai does the opposite. The student model is trained with weights already constrained to the binary or ternary alphabet. The loss function sees the rounding error from the start, so the model learns weight patterns that remain useful after extreme compression. That is how math stays at 91.66% of full precision and coding at 81.88% in the 1-bit variant, with the ternary version even closer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for developers
&lt;/h2&gt;

&lt;p&gt;A 3.9 GB 27B-class model changes where capable AI can run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Locally&lt;/strong&gt;, without sending code to a third-party API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On a laptop&lt;/strong&gt; with no external GPU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On a phone&lt;/strong&gt; via MLX Swift on Apple Silicon.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On a single 24 GB GPU&lt;/strong&gt; with room for context and batches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not a replacement for frontier cloud models on every task. Long-horizon agentic coding and the hardest reasoning categories still favor full precision. But for routine coding, refactoring, explanation, and long-document analysis, local models just became a lot more credible.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am watching next
&lt;/h2&gt;

&lt;p&gt;The most interesting line is &lt;strong&gt;agentic coding&lt;/strong&gt;. Prism ML has said a Bonsai variant tuned for multi-file, run-test-and-repair workflows is next. If a local model can handle that class of work, the boundary between "cloud-only" and "local-first" coding assistants moves again.&lt;/p&gt;

&lt;p&gt;If you want the full pipeline — architecture, kernels, DSpark speculative decoding, and the benchmark breakdown — the complete post is here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://fernando-nog.netlify.app/bonsai-distillation-explained-from-qwen36-27b-to-a-phone-friendly-39-gb-model/" rel="noopener noreferrer"&gt;Bonsai Distillation Explained: From Qwen3.6-27B to a Phone-Friendly 3.9 GB Model&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;I write about AI, backend development, and practical engineering on my &lt;a href="https://fernando-nog.netlify.app/" rel="noopener noreferrer"&gt;technical blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>bonsai</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>localai</category>
    </item>
  </channel>
</rss>
