<?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: Carlos Cabrales III</title>
    <description>The latest articles on DEV Community by Carlos Cabrales III (@carloscbrls).</description>
    <link>https://dev.to/carloscbrls</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%2F4272212%2F99c3389b-ca6b-4cee-b74a-94dfc10b0b86.png</url>
      <title>DEV Community: Carlos Cabrales III</title>
      <link>https://dev.to/carloscbrls</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carloscbrls"/>
    <language>en</language>
    <item>
      <title>Will It Fit? Sizing Local LLMs on a 12 GB GPU — the method, the math, and a calculator</title>
      <dc:creator>Carlos Cabrales III</dc:creator>
      <pubDate>Sun, 29 Nov 2026 12:30:55 +0000</pubDate>
      <link>https://dev.to/carloscbrls/will-it-fit-sizing-local-llms-on-a-12-gb-gpu-the-method-the-math-and-a-calculator-mc1</link>
      <guid>https://dev.to/carloscbrls/will-it-fit-sizing-local-llms-on-a-12-gb-gpu-the-method-the-math-and-a-calculator-mc1</guid>
      <description>&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt; Whether a local model fits on your hardware is arithmetic, not vibes: weights at your quant, plus the KV cache at your context length, plus a stated allowance for runtime buffers. For Qwen3-8B at Q4_K_M with a 32k context, that sum is &lt;strong&gt;10.02 GB&lt;/strong&gt; — a tight fit on a 12 GB card, with the KV cache (4.82 GB) costing more than half the weights (4.40 GB). Speed is a second, separate question, and memory bandwidth answers it. We run this math for small businesses before anyone downloads anything; the calculator below is the same method, live.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Qwen3-8B, Q4_K_M&lt;/th&gt;
&lt;th&gt;4k context&lt;/th&gt;
&lt;th&gt;32k context&lt;/th&gt;
&lt;th&gt;65k context&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total memory bill&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5.80 GB&lt;/td&gt;
&lt;td&gt;10.02 GB&lt;/td&gt;
&lt;td&gt;14.83 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RTX 3060, 12 GB VRAM&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;TIGHT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;DOES NOT FIT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Generic laptop, 16 GB&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;td&gt;TIGHT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mac Mini M4, 24 GB unified&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;td&gt;FITS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The question every buyer actually asks
&lt;/h2&gt;

&lt;p&gt;"Can my office PC run this?" is the first question in almost every local-AI conversation we have with nonprofits and small businesses. The honest answer is never on the box. Model pages advertise parameter counts; hardware pages advertise VRAM; neither mentions the second memory bill that arrives the moment you start a real conversation with the model. People download an 8B model for a 12 GB card, watch it load, and conclude it fits — then raise the context window for a long document and watch it spill, crawl, or die. The fit question has three terms, and two of them are usually left out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The method: three terms, every number labeled
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Weights.&lt;/strong&gt; Parameters × effective bytes per parameter at your quantization. Our table uses Q4_K_M at 0.55 bytes per parameter (an estimate, including scales and metadata), so an 8B model bills &lt;strong&gt;4.40 GB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. KV cache.&lt;/strong&gt; The model's running notes on the conversation live in fast memory too, and they grow with every token of context. For the Qwen3-8B class (36 layers × 8 KV heads × 128 head dimension, fp16 cache) the computed estimate is &lt;strong&gt;0.147 MB per token&lt;/strong&gt;: roughly 0.6 GB at 4k context, &lt;strong&gt;4.82 GB at 32k&lt;/strong&gt;, 9.63 GB at 65k. This is the term that surprises people — at working context lengths it rivals the weights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A stated allowance.&lt;/strong&gt; We add &lt;strong&gt;0.8 GB&lt;/strong&gt; for runtime buffers and say so out loud. A sizing method with a hidden fudge factor is a sales tool; with the allowance printed, it's a method you can argue with.&lt;/p&gt;

&lt;p&gt;Verdicts: a total at or under 75% of the machine's fast memory is &lt;strong&gt;FITS&lt;/strong&gt;; up to 100% is &lt;strong&gt;TIGHT&lt;/strong&gt; (it runs, with nothing left for a second job); above that, &lt;strong&gt;DOES NOT FIT&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed is bandwidth.&lt;/strong&gt; Generation speed is capped by how fast the machine can read the weights (plus the growing cache) once per token: ceiling ≈ memory bandwidth ÷ bytes read per token. Our RTX 3060 (360 GB/s) has a predicted ceiling of about 69 tokens/second at short context by this rule; we &lt;strong&gt;measure about 58 tokens/second&lt;/strong&gt; generation on Qwen3-8B under Ollama on that box (measured), with prompt processing at about 277 tokens/second (measured) and a 2.6-second cold load (measured). The same rule predicts the ceiling sags to roughly 39 tokens/second as the context fills toward 32k — that sag is a &lt;strong&gt;prediction&lt;/strong&gt;, and grading predictions against later measurements is part of the discipline. On the Mac Mini M4 (120 GB/s unified), the rule predicts a decode ceiling of about 23 tokens/second at short context (predicted) — the Mini has twice the memory and a third of the bandwidth, which is why it fits more and answers slower.&lt;/p&gt;

&lt;p&gt;One practical consequence hides in the defaults: Ollama's default context window is 4,096 tokens. The 5.80 GB row is what most people are actually running. Raising the window to 32k is a configuration decision that nearly doubles the memory bill — make it on purpose, with the table in front of you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it: the calculator is the method
&lt;/h2&gt;

&lt;p&gt;The Local AI Sizing Lab is this article's arithmetic as a working tool — pick a model size, a quant, and a context, and get the bill and the verdict for all three machines, with every number labeled measured, computed, or predicted. It also carries the three short lessons we teach from it (why a 14B can feel slower than an 8B, the KV cache as the second memory bill, and when hosted inference honestly beats local), plus a capped Qwen3-8B chat demo on free quota.&lt;/p&gt;

&lt;p&gt;Space: &lt;a href="https://huggingface.co/spaces/carloscbrls/local-ai-sizing-lab" rel="noopener noreferrer"&gt;https://huggingface.co/spaces/carloscbrls/local-ai-sizing-lab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The companion artifacts, all in one collection — &lt;a href="https://huggingface.co/collections/carloscbrls/cc3po-local-ai-for-small-business:" rel="noopener noreferrer"&gt;https://huggingface.co/collections/carloscbrls/cc3po-local-ai-for-small-business:&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deployment profiles&lt;/strong&gt; — the sizing method, tables, and worked examples as a documented artifact: &lt;a href="https://huggingface.co/carloscbrls/local-ai-deployment-profiles" rel="noopener noreferrer"&gt;https://huggingface.co/carloscbrls/local-ai-deployment-profiles&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The golden set (public edition)&lt;/strong&gt; — how we check a local model against frozen, human-verified expectations before trusting it in a lane; a sanitized synthetic edition of the regression set we run before any model swap serves: &lt;a href="https://huggingface.co/datasets/carloscbrls/local-judge-golden-set-public" rel="noopener noreferrer"&gt;https://huggingface.co/datasets/carloscbrls/local-judge-golden-set-public&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the local side yourself in two commands (after installing Ollama from ollama.com):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull qwen3:8b
ollama run qwen3:8b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the bill before you raise the context window — the default is 4k, and the table above is what changes when you do.&lt;/p&gt;

&lt;h2&gt;
  
  
  When local loses — the honest part
&lt;/h2&gt;

&lt;p&gt;Concurrency is the real spill risk: the table sizes &lt;em&gt;one&lt;/em&gt; session, and a second simultaneous user roughly doubles the cache term. Long contexts on small cards trade speed for memory in a way the ceiling rule makes visible before you feel it. And some workloads simply belong hosted — bursty, rare, or larger than any machine you own. We sell local AI for a living and still tell clients this: local wins on privacy, marginal cost, and control; it does not win by default. The sizing math is how you find out which side of that line your workload is on, before you've spent anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;This method is part of what we teach in the &lt;strong&gt;Applied AI &amp;amp; Automation Lab&lt;/strong&gt;, launching January 2027 — hands-on local AI for nonprofits and small businesses, on hardware they already own. More at &lt;a href="https://cc3po.com" rel="noopener noreferrer"&gt;cc3po.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;— Carlos Cabrales III, CC3PO / CCFamily, California's Central Valley&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
