Running Open-Weight Models Locally: Fit the Model to the Hardware You Have
How to size an open-weight LLM for the machine in front of you: the memory arithmetic, what quantization costs you, why published tokens-per-second figures are often ceilings rather than measurements, and which runtime to pick.
TL;DR
Start from the machine, not the model. The 2026 round-ups agree on one rule and it is the only one that matters at the beginning: do not start with the biggest model, start with the best model your hardware can comfortably run.
Three numbers decide what fits. Weight size at your chosen quantization, the KV cache for the context length you actually use, and memory bandwidth, which sets your ceiling on generation speed. Compute throughput is rarely the binding constraint for single-user local inference.
And be sceptical of the speed tables. One of the most detailed guides in circulation states plainly that its tokens-per-second figures are bandwidth ceilings, not measurements.
How much memory does a model actually need?
Roughly, weights in gigabytes equal parameters in billions multiplied by bytes per parameter, plus the KV cache, plus runtime overhead.
At FP16 that is 2 bytes per parameter. At 4-bit quantization it is closer to 0.5, plus some unquantized layers, which is why a 14B model lands somewhere near 8-10GB rather than exactly 7GB.
The published tiers line up reasonably well across sources. Local AI Master's table, with the recommended GPU column:
| Model size | FP16 | 4-bit | Suggested GPU |
|---|---|---|---|
| 1-2B | 2-4GB | 1-2GB | Any 4GB+ GPU |
| 3-4B | 6-8GB | 2-4GB | RTX 3060 |
| 7B | 14-16GB | 3.5-5GB | RTX 3060 12GB |
| 13-14B | 26-28GB | 8-10GB | RTX 4090 |
The Hugging Face guide tiers by whole machine instead, which is often the more useful framing:
| Machine | What the guide suggests running |
|---|---|
| 8GB RAM, CPU only | Phi-4-mini, Gemma 3 1B, Qwen3 1.7B — "slow but usable" |
| 16GB RAM laptop | Phi-4-mini, Gemma 3 4B, Qwen3 4B or 8B |
| 32GB Mac or PC | Gemma 3 12B, Devstral, Qwen3 14B |
| 24GB VRAM (RTX 3090/4090) | Gemma 3 27B, Qwen3 30B, Devstral |
| 48GB VRAM workstation | Qwen3 32B, Mistral Small 3.1, larger quantized models |
| 80GB GPU, H100 class | gpt-oss-120b, Llama 4 Scout |
| Multi-GPU or private GPU cloud | DeepSeek-V4, Qwen3 235B, Llama 4 Maverick |
Do not forget the context window in this arithmetic. The Qwen guide gives worked totals at 4-bit: an 8B model with 8K context at roughly 6GB total, a 14B at 8K context around 12GB, a 32B at only 4K context already around 21GB. The KV cache is what turns a comfortable fit into an out-of-memory error when someone pastes a long document.
What does quantization actually cost?
Quantization is the lever that makes any of this work on consumer hardware. The trade is quality for memory, and it is not linear.
| Level | Quality loss as described | Size reduction | When to use |
|---|---|---|---|
| Q8 | Minimal | ~2x | Quality-critical work |
| Q5_K_M | Low | ~3x | Best general balance |
| Q4_K_M | Low to moderate | ~4x | Limited VRAM, the common default |
| Q3_K_M | Moderate | ~5x | Memory-critical |
| Q2_K | Noticeable | ~8x | Last resort |
Q4 is the standard starting point and what Ollama mostly ships by default. Q5_K_M is the recommendation when you have the headroom.
Two refinements worth knowing. Importance-matrix quantization uses a calibration pass to decide which weights tolerate more aggressive compression, and generally produces a better model at the same file size. And quantization-aware training goes further by training the model for the target precision rather than compressing afterwards. Google shipped QAT checkpoints for Gemma 4, and a 4-bit QAT Gemma is the pick in KDnuggets' coding list partly for that reason.
One trap: the download size and the memory footprint are not the same number, and the sources disagree with themselves about it. Local AI Master lists Phi-4-mini as a 2.2GB download but about 3GB of VRAM, and the Gemma 4 E-series downloads at 7.2GB and 9.6GB because Ollama's default tags for those models are higher precision than 4-bit. Check the tag you are pulling, not the family name.
Why is memory bandwidth the number that decides speed?
For single-stream generation, each token requires reading the active weights out of memory. That makes bandwidth, not compute, the ceiling. The rough estimate is memory bandwidth divided by the size of the weights you must read per token.
This is exactly how most published throughput figures are produced, and it is why they should be read as ceilings. Local AI Master is admirably explicit that its numbers come from dividing bandwidth by file size rather than from running anything, with a single measured data point to anchor them: an M3 Pro producing 55.6 tokens per second on a 3B model against a calculated ceiling near 74. About three quarters of theory.
Its Apple Silicon ceilings, on that basis:
| Machine | Bandwidth | Comfortable size | Calculated ceiling |
|---|---|---|---|
| M1, 8GB | 68 GB/s | 3B-7B | ~34 tok/s at 3B |
| M2 Max, 32-64GB | 400 GB/s | 14B-32B | ~43 tok/s at 14B |
| M4 Max, 128GB | 546 GB/s | 70B+ | ~13 tok/s at 70B |
The same reasoning explains why CPU-only inference is viable at small sizes and painful above them. Dual-channel DDR5-5600 at roughly 90 GB/s supports an interactive experience at 3B and a slow one at 8B. DDR4-3200 at about 51 GB/s is batch-processing territory.
Measured figures, where they exist, are more useful. The Qwen guide publishes timings from the author's own machines: a 27B dense model at 4-bit on an RTX 3090 at 41.77 tok/s using 18.5GB of VRAM, and a 35B mixture-of-experts model with 3B active at 157.66 tok/s using 22.7GB on the same card. That gap is the whole argument for sparse architectures on consumer hardware — the memory cost of the full weights, the generation speed of a small one.
For the broader picture of how CPU, GPU and NPU differ for inference, see GenAI hardware: CPU, GPU, NPU and model serving.
Which runtime should you use?
The honest answer for most people is Ollama until you have a specific reason to move. The Hugging Face guide's framing — start here unless you have a reason not to — matches what actually happens in practice.
| Runtime | Best for | Watch out for |
|---|---|---|
| Ollama | Getting started, local OpenAI-compatible API, quick comparisons | Default tags vary in precision between model families |
| LM Studio | Desktop GUI, non-coders, GGUF browsing, local server | Less scriptable than a CLI |
| llama.cpp | GGUF control, CPU inference, Apple Silicon, offload flags | Least beginner-friendly |
| vLLM | Production serving, multiple concurrent users, throughput | Not aimed at single-user laptops |
| SGLang | High-performance and distributed serving, multimodal and agent workloads | Wrong starting point for beginners |
| Open WebUI | A chat interface over Ollama or another backend, internal teams | It is a frontend, not an inference engine |
| MLX | Apple Silicon specifically | Mac-only; benchmark it against llama.cpp rather than assuming |
On Macs that last row matters more than its position suggests. MLX is often faster than llama.cpp on the same machine, and the only way to know for your model is to run both. We have written up that path in Getting started with Apple MLX for local AI.
One flag worth knowing for mixture-of-experts models on a small GPU: llama.cpp can keep expert layers in system RAM while the rest runs on the card. The Qwen guide reports a 35B MoE model at 38.9 tok/s using only 9.8GB of VRAM on an RTX 3060 12GB with 24 expert layers offloaded. That is a 30B-class model running usefully on a mid-range card.
Where do the published numbers disagree?
This is the part the round-ups do not tell you, and it is the reason to anchor your decision in your own measurements.
| Claim | Source A | Source B |
|---|---|---|
| What counts as a small model | Under ~10B parameters (Local AI Master's own definition) | The same page's title says 1B-14B and ranks a 14B model first |
| Llama 3.2 3B MMLU | 63.4% in one table | 61.8% in another section of the same page |
| Phi-4 14B memory | ~10GB in the benchmark table | ~9GB download, needs 12GB VRAM, in the Ollama section |
| Qwen 35B-A3B on an RTX 3090 | 112 tok/s | 157.66 tok/s for the next generation of the same size class |
| Qwen licensing | "Everything is Apache 2.0" | The same guide later describes an API-only generation and a flagship under a custom licence |
| Publication date | Published March 2026 | Same page, "last updated November 2026", body text referencing August |
None of this makes the sources useless. It makes them shortlisting tools. Internal contradictions inside a single page are a good signal of how much of this material is assembled rather than measured, and at least two of these sites disclose that their content is partly AI-assisted.
A practical sequence
- Measure your ceiling. Find your memory bandwidth and usable memory. On a Mac that is unified memory; on a PC, VRAM first and system RAM as the fallback tier.
- Pick the size band, not the model. Use the tier tables above to decide whether you are shopping at 4B, 9B, 14B or 30B-class.
- Start at Q4_K_M. Move to Q5_K_M if you have headroom, Q8 only if quality is failing.
- Add your real context length to the memory estimate before you commit. Test with your longest realistic prompt, not a one-liner.
- Run two or three candidates on your own tasks. Coding fix, retrieval over your own document, a tool call, and a long-context recall check.
- Record tokens per second and resident memory yourself. A published ceiling is not a result.
- Check the licence before anything reaches a product.
Key takeaways
- Fit the model to the machine. The best local model is the largest one that runs comfortably, not the largest one that technically loads.
- Weights plus KV cache plus overhead is the memory budget. The context window is the part people forget until it crashes.
- Q4_K_M is the sensible default; Q5_K_M when you have room. QAT and importance-matrix quants give you more quality at the same size.
- Download size is not memory footprint, and default precision varies by model family.
- Memory bandwidth sets your speed ceiling. Most published tokens-per-second figures are that calculation, not a measurement.
- Mixture-of-experts models give you small-model speed at large-model memory cost, and expert offload makes them viable on mid-range GPUs.
- Start with Ollama. Move to llama.cpp for control, vLLM for serving, MLX on a Mac if it benchmarks faster.
References
- Hugging Face — The Best Open Source and Open-Weight LLM Models to Run Locally in 2026
- Local AI Master — Best Small Language Models 2026: Top SLMs Ranked (1B-14B)
- InsiderLLM — Best Qwen Models Ranked: Which to Run Locally
- Turing Post — Small Language Models in 2026: 10 to Know, Compared
- llama.cpp
- Ollama
Related Reading
- Small language models in 2026: how to choose one without guessing
- Local coding models in 2026: where they fit in a delivery workflow
- System Check for AI: know what your hardware can actually run
- GenAI hardware: CPU, GPU, NPU, inference and model serving
- Getting started with Apple MLX for local AI and LLM app development
- Sovereign AI on metal with vLLM
Ask AI About the Author
Open this query in ChatGPT, Claude, or Perplexity.
Comments
Comments are open to confirmed email subscribers. Use the email you subscribed with. To edit a comment, delete it and post a new one.
Subscribe to get the new blogs.
Field notes from someone who ships before they write about it. Sovereign AI, AI-SDLC, DevOps, and what 59 production deployments teach you. No spam. Unsubscribe anytime.