Understanding Quantization
If you try to run an uncompressed, full‑precision open‑source model on a consumer machine, you will almost instantly run out of memory. Quantization is the secret math that makes local AI possible for everyday users.
It compresses a model’s weights so it uses a fraction of the VRAM while retaining nearly all of its original intelligence.
📉 Bits and Brains: How It Works
AI models are collections of numbers called weights. In their native form, these weights are stored as high‑precision 16‑bit floating‑point numbers (FP16).
Quantization maps those precise 16‑bit numbers down to smaller formats — 8‑bit, 4‑bit, or even 3‑bit integers.
Think of it like saving a massive image file:
- FP16 (Uncompressed): A raw, uncompressed photo. Perfect, but huge.
- Q4 (Quantized): A highly optimized JPEG. If you zoom in with a magnifying glass, you might notice tiny artifacts — but to the naked eye, it looks identical and is 75% smaller.
Quantization is how you fit a “giant brain” into a normal laptop.
🔠 Common 2026 Quantization Formats
When downloading models via LM Studio, Ollama, or vMLX, you’ll see shorthand extensions attached to model names. Here’s what they mean.
The GGUF Standard (Ollama + llama.cpp + LM Studio)
GGUF is the standard format used by Ollama, LM Studio, and llama.cpp. It allows your computer to split a model across GPU VRAM and system RAM if needed. Other engines use different formats with a similar intent: ExLlamaV2 uses GPTQ and its native EXL2 format, while vMLX uses Apple’s native MLX format.
-
Q4_K_M(4‑bit Medium):
The global standard for everyday use. Fast token speeds, drastically reduced VRAM, and only minor reasoning loss. -
Q5_K_M(5‑bit Medium):
The “sweet spot” for text and coding. Recovers most of the model’s intelligence while still saving huge amounts of VRAM. -
Q8_0(8‑bit):
Near‑native accuracy. Use this only if you have VRAM to spare and need maximum precision for math or technical coding.
Importance Matrix (IQ) Quants
These formats compress less‑critical layers more aggressively while preserving core reasoning layers.
-
IQ4_XS
Ultra‑small footprint with surprisingly strong reasoning. Ideal for laptops and 8–12GB GPUs. -
IQ3_M
Extremely compact. Works best on large models (70B+) and MoE architectures.
🧮 Which Quant Should YOU Choose?
Your hardware determines the best quantization format. Use this table as your quick reference.
| VRAM / Unified Memory | Recommended Quant | Best Model Sizes | Notes |
|---|---|---|---|
| — | — | — | — |
| 8–12GB | Q4_K_M | 3B–8B | Fastest and smallest; ideal for everyday tasks. |
| 16GB | Q4_K_M / Q5_K_M | 8B–14B | 16GB is the “middle class” of local AI — Q5_K_M gives better reasoning. |
| 24–36GB | Q5_K_M / Q8_0 | 14B–32B | Unlocks strong reasoning, coding, and MoE models with near‑native accuracy. (Q8_0 fits the smaller sizes in this band, and only toward the top of the range.) |
| 48GB+ | Q4_K_M / IQ4‑class | 70B+ | Where 70B‑class models become practical — 4‑bit weights fit with room for context. (Q8_0 at 70B needs ~80GB+.) |
Want the full hardware picture?
Quantization only solves half of the memory problem.
To understand model residency, switching costs, and how VRAM vs. Unified Memory affects real workloads, see:
Local LLM Hardware: GPU VRAM vs. Unified Memory
Additional Notes
-
MoE models (Gemma 4‑26B‑A4B, Qwen 3.8 MoE, Llama 4 MoE)
Perform extremely well at Q4_K_M and often tolerate IQ3_M without major degradation.
MoE routing layers typically remain higher precision automatically. -
Large models tolerate compression better than small ones.
A 70B model at IQ3_M can outperform a 7B model at Q5_K_M on many tasks. -
VRAM fit is king.
A smaller quantized model running fully in VRAM will always outperform a larger model spilling into slow system RAM.
🧩 Mixture of Experts (MoE), in Brief
Many of today’s best local models — Gemma 4 MoE, Llama 4, Qwen 3.8 MoE — aren’t one big brain. An MoE model bundles many smaller experts behind a router that activates only 2–4 of them per token; the rest stay asleep. Think of a good receptionist routing a tax question straight to the accountants instead of crowding the whole company into one room.
Why it matters for quantization:
- Big-model intelligence, small-model speed: a 26B MoE may use only ~4B active parameters per token, so it answers like a giant and computes like a mid-size model. That’s a speed saving, not a memory saving — see “the catch” below.
- High quantization tolerance: MoE models hold up unusually well at tight quants like
Q4_K_MandIQ3_M— routing layers stay at higher precision automatically (see the notes above). - Bigger context windows: many MoE architectures ship with larger context windows than dense models at the same parameter count — ideal for research, coding, and document-heavy work.
- Small rigs still play — barely: on 16GB (an RTX 5070 Ti-class GPU or a unified-memory Mac), a compressed 26B-class MoE like Gemma 4-26B-A4B is a tight fit: the weights alone run roughly 14GB at
Q4_K_M, leaving little room for context and runtime overhead.IQ3_M(roughly 11GB of weights) fits with breathing room. - The catch — the whole file must fit: inactive experts still live in memory. A 70B-class MoE wants 48GB+ of VRAM or unified memory even though only a fraction computes at once, and the experts eat SSD space too.
Two honest caveats: routing noise — occasionally the router selects an expert suboptimally and you get a “weird” answer; heavy quantization can amplify this. And engine support — Ollama and LM Studio handle MoE seamlessly, but high-speed backends (like vMLX or certain ExLlamaV2 branches) may lag behind on sparse-architecture optimizations.
For the hardware tiers that run these models, see Local LLM Hardware.
🧰 Quantization Across Hosting Tools
Different engines support different quant formats:
- Ollama: GGUF only
- LM Studio: GGUF + GPTQ
- vMLX: MLX + JANG adaptive quants + native Hugging Face weights
- ExLlamaV2: GPTQ / EXL2
This is why downloads sometimes look different depending on your tool.
For a full breakdown of hosting tools, see:
👉
Local AI Hosting Tools
⚖️ The Trade-Off: Speed vs. Smarts
When choosing a quant, follow this simple loop:
-
Fit the model entirely in VRAM.
This is the single biggest performance factor. -
Start with Q4_K_M.
If you have headroom, move up to Q5_K_M or Q8_0. -
Use IQ quants for laptops or tight VRAM budgets.
-
Use Q8_0 only when you truly need maximum precision.
Next Steps
-
Return to the master setup:
👉 Local AI Setup for Busy Humans -
See the hardware tiers:
👉 Local LLM Hardware: GPU VRAM vs. Unified Memory -
Choose your hosting tools:
👉 Local AI Hosting Tools -
Pick your model:
👉 Advanced AI Models for Power Users