Paj Digital Labs
All articles
AI & Automation

Running Local Models for Real Work: VRAM Math and Quantization Trade-offs

The gap between 'runs on my laptop' and 'useful on my laptop' is arithmetic. How to calculate what actually fits, what quantization costs you, and which workloads belong local in the first place.

Paj Digital Labs 3 min read
Robotic gripper sorting components on a laboratory workbench
Editorial illustration · AI & Automation

The local model conversation is full of vibes. Someone runs a 7B model on a MacBook, declares the cloud obsolete, and the replies are full of people whose actual workload — long documents, agentic loops, codebases — falls apart on the same hardware. Both are right. The difference is arithmetic, and nobody does it.

The VRAM formula

A model's memory footprint is approximately:

text
VRAM ≈ (parameters × bytes per weight) + KV cache + overhead

Bytes per weight depends on precision:

| Format | Bytes/param | 7B model | 13B model | 70B model | | :--- | :--- | :--- | :--- | :--- | | FP16 | 2 | 14 GB | 26 GB | 140 GB | | Q8 | 1 | 7 GB | 13 GB | 70 GB | | Q4 | ~0.55 | ~4 GB | ~7.5 GB | ~40 GB |

The KV cache is the part everyone forgets. It stores attention state for the context window, and it grows linearly with context length. A 7B model at Q4 with a 32K context can easily need 4 GB of weights plus 2–4 GB of KV cache. That "4 GB model" is why your 8 GB card chokes on long documents.

Rule of thumb: budget 1.5× the weight size for a usable setup, and leave 2 GB for the OS and your display. A 24 GB card comfortably runs a Q4 32B-class model with real context. A 12 GB card runs 13B at Q4 or 7B with generous context. Below that, you are in 7B territory with short contexts, and you should be honest about what that can do.

What quantization actually costs

Quantization compresses weights from 16-bit to fewer bits. The quality loss is not linear and not uniform:

  • Q8 is effectively free. If you have the VRAM, take it.
  • Q4 is the sweet spot. Perplexity rises slightly; real-world task performance drops a little, mostly on nuanced reasoning and rare-knowledge recall.
  • Q3 and below is where the damage shows. The model gets confidently weird. Avoid unless the alternative is not running at all.

The subtle cost of Q4 is not average quality — it is variance. The model is fine 95% of the time and oddly wrong 5% of the time, in ways that are hard to predict. For drafting and summarization, irrelevant. For extraction pipelines feeding a database, that 5% is your error budget, and you need validation downstream.

Which workloads belong local

Good fits: drafting and rewriting, summarization of documents you cannot send to a third party, classification and routing, autocomplete-style coding assistance, anything privacy-sensitive where the alternative is "we just don't do it."

Bad fits: frontier reasoning, long agentic chains where errors compound, anything where a wrong answer is expensive and unvalidated, workloads that need 100K+ context on consumer hardware.

The honest framing: a local 7B–32B model today is a very good junior assistant. It drafts, it summarizes, it transforms. It does not replace the frontier API for the hard 10% of tasks — but most workloads are not the hard 10%.

The economics

A 24 GB GPU box costs roughly what a moderate API bill costs per month. If your workload is high-volume and low-complexity — classifying 50,000 support tickets a month — local wins on cost within a quarter and on privacy immediately. If your workload is bursty and hard, the API wins and it is not close.

Do the math per workload, not per ideology. The teams getting value from local models are the ones who benchmarked their actual tasks, picked the smallest model that passed, and kept the API for the rest. The ones who fail picked a side first and measured never.

Paj Digital Labs

The engineering journal of Paj Digital Solutions — hosting, server infrastructure and web engineering, written by the people who run the servers.

Related reading