<?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: Frank</title>
    <description>The latest articles on DEV Community by Frank (@froid1911).</description>
    <link>https://dev.to/froid1911</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%2F4237131%2F9484aee7-52d0-4745-97ff-a887d9160aac.jpg</url>
      <title>DEV Community: Frank</title>
      <link>https://dev.to/froid1911</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/froid1911"/>
    <language>en</language>
    <item>
      <title>How much GPU do you need to run an LLM locally? The rules of thumb we use</title>
      <dc:creator>Frank</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:07:35 +0000</pubDate>
      <link>https://dev.to/web3berlin/how-much-gpu-do-you-need-to-run-an-llm-locally-the-rules-of-thumb-we-use-1c37</link>
      <guid>https://dev.to/web3berlin/how-much-gpu-do-you-need-to-run-an-llm-locally-the-rules-of-thumb-we-use-1c37</guid>
      <description>&lt;p&gt;Every few weeks a client asks us the same question: &lt;em&gt;"We want to use AI on our own documents, but nothing may leave the building. What hardware do we need?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The answer almost always comes down to one number: &lt;strong&gt;GPU memory (VRAM)&lt;/strong&gt;. Here are the rules of thumb we use when we size machines for clients and for our own lab. (We also wrote a longer, non-technical version of this guide in German: &lt;a href="https://web3.berlin/de/lokale-ki-hardware.html" rel="noopener noreferrer"&gt;Lokale KI im Unternehmen: Welche Hardware brauchen Sie wirklich?&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: the model has to fit into VRAM
&lt;/h2&gt;

&lt;p&gt;A language model is billions of parameters. To answer fast, all of them need to sit in the GPU's memory. If the model spills over into system RAM, it still runs, but it gets many times slower.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;4-bit quantization&lt;/strong&gt; (e.g. &lt;code&gt;Q4_K_M&lt;/code&gt; in GGUF, the usual trade-off between quality and size), a model needs roughly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;≈ 0.6 GB of VRAM per billion parameters&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That number comes from Q4_K_M averaging a bit under 5 bits per weight. So:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model size&lt;/th&gt;
&lt;th&gt;VRAM at 4-bit&lt;/th&gt;
&lt;th&gt;Typical hardware&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;7–8B&lt;/td&gt;
&lt;td&gt;~5–6 GB&lt;/td&gt;
&lt;td&gt;almost any current GPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14B&lt;/td&gt;
&lt;td&gt;~9–10 GB&lt;/td&gt;
&lt;td&gt;a 12–16 GB card&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32B&lt;/td&gt;
&lt;td&gt;~20 GB&lt;/td&gt;
&lt;td&gt;one 24 GB card, e.g. RTX 3090&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70B&lt;/td&gt;
&lt;td&gt;~40–45 GB&lt;/td&gt;
&lt;td&gt;two 24 GB cards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;600B+ (e.g. full DeepSeek)&lt;/td&gt;
&lt;td&gt;several hundred GB&lt;/td&gt;
&lt;td&gt;server with multiple datacenter GPUs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are weights only, without a long context. Exact numbers depend on the model, the quantization and the inference engine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: don't forget the KV cache
&lt;/h2&gt;

&lt;p&gt;The weights are only half the story. Every token in the context (your documents, the chat history) needs memory too: the &lt;strong&gt;KV cache&lt;/strong&gt;. For long documents or several users at once, this easily adds several gigabytes.&lt;/p&gt;

&lt;p&gt;You can estimate it from the model's &lt;code&gt;config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KV bytes per token = 2 × layers × kv_heads × head_dim × bytes_per_value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example: &lt;strong&gt;Qwen2.5-32B&lt;/strong&gt; has 64 layers, 8 KV heads and a head dimension of 128. At FP16 (2 bytes):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 × 64 × 8 × 128 × 2 = 262,144 bytes ≈ 256 KB per token
32,768 tokens × 256 KB ≈ 8 GB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So a 32B model with a full 32k context needs about 20 GB for the weights &lt;strong&gt;plus&lt;/strong&gt; 8 GB for the&lt;br&gt;
cache. That no longer fits on a single 24 GB card. Your options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use a shorter context (most chat turns don't need 32k),&lt;/li&gt;
&lt;li&gt;quantize the KV cache to 8-bit (halves it, usually with little quality loss),&lt;/li&gt;
&lt;li&gt;or add a second GPU.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Models with grouped-query attention (few KV heads, like the example above) are much cheaper here than older models with one KV head per attention head.&lt;/p&gt;
&lt;h2&gt;
  
  
  Rule 3: start with the smallest model that does the job
&lt;/h2&gt;

&lt;p&gt;Bigger isn't automatically better, and it's always slower and more expensive.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small (up to ~8B):&lt;/strong&gt; summaries, classification, extraction, simple Q&amp;amp;A. Efficient models like 
Liquid AI's LFM family even run on weaker hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium (14–32B):&lt;/strong&gt; the sweet spot for most companies. A good assistant, good search over your 
own documents (RAG), useful coding help. Qwen has strong models in this class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large (70B+):&lt;/strong&gt; demanding writing, complex analysis, many concurrent users.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New open-weight models come out every few months, and the medium class catches up fast. A 32B modetoday does what needed 70B not long ago.&lt;/p&gt;
&lt;h2&gt;
  
  
  Three typical setups
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Workstation with one GPU.&lt;/strong&gt; One 24 GB card handles models up to ~32B. Good for a small team with an assistant and document search.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Workstation with several GPUs.&lt;/strong&gt; Two to four cards give you 48–96 GB. That's enough for the 70B class, several models side by side, or image and video generation. With llama.cpp, splitting a model across cards is one flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;llama-server -m model-Q4_K_M.gguf \
  -ngl 99 \
  --split-mode layer --tensor-split 1,1,1,1 \
  -c 16384
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-ngl 99&lt;/code&gt; offloads all layers to the GPUs, &lt;code&gt;--tensor-split&lt;/code&gt; sets the share per card.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A dedicated GPU server in an EU data centre.&lt;/strong&gt; No hardware in the office, but still no AI provider in between. We use dedicated servers (e.g. at Hetzner in Finland) for clients who need GDPR-friendly setups without running their own machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  What people forget
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Power and heat.&lt;/strong&gt; An RTX 3090 is rated for up to 350 W. Four of them pull more than 1.4 kW under load, just for the GPUs. You need a matching power supply, circuit and cooling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Noise.&lt;/strong&gt; A multi-GPU workstation doesn't belong next to a desk. Put it in a server or utility room.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System RAM and CPU.&lt;/strong&gt; Plenty of RAM helps with loading models and with processing large document batches, e.g. OCR on scans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operations.&lt;/strong&gt; Updates, monitoring and swapping in new models take ongoing time. Plan for it, whether you do it yourself or someone does it for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Our own lab
&lt;/h2&gt;

&lt;p&gt;We only recommend what we run ourselves. Our lab workstation has &lt;strong&gt;four RTX 3090s (96 GB VRAM total), a Threadripper 3960X and 256 GB of DDR4&lt;/strong&gt;. We use it to test new open-weight models such as&lt;br&gt;
Qwen, DeepSeek and Liquid AI for text, code, images and video, mostly with llama.cpp. For documents&lt;br&gt;
like PDFs and scans we use &lt;a href="https://github.com/docling-project/docling" rel="noopener noreferrer"&gt;Docling&lt;/a&gt;, also in production for clients. More about the setup: &lt;a href="https://web3.berlin/work/lab.html" rel="noopener noreferrer"&gt;our lab&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;4-bit model ≈ &lt;strong&gt;0.6 GB VRAM per billion parameters&lt;/strong&gt;, plus the KV cache for your context.&lt;/li&gt;
&lt;li&gt;For most teams, &lt;strong&gt;one 24 GB GPU&lt;/strong&gt; or a rented GPU server in the EU is enough to start.&lt;/li&gt;
&lt;li&gt;Pick the model that fits the task, not the biggest one, and plan for running it, not just buying it.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I'm Frank, founder of &lt;a href="https://web3.berlin" rel="noopener noreferrer"&gt;web3.berlin&lt;/a&gt;, a small engineering team in Berlin. We set up &lt;a href="https://web3.berlin/private-ai.html" rel="noopener noreferrer"&gt;private AI on clients' own servers&lt;/a&gt; and build blockchain infrastructure. Questions about sizing a setup? Ask in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>selfhosted</category>
      <category>ai</category>
      <category>gpu</category>
    </item>
  </channel>
</rss>
