LLM quantization is the process of reducing the numerical precision of a language model's weights — from 16-bit floating point down to 4-bit or even 2-bit — so the model occupies less memory and runs faster on consumer hardware. Done well, an 86% size reduction can cost under 1% accuracy. Done badly, a single wrong number can destroy the entire model.
This guide explains how quantization works in practice, why a bigger model quantized to 4-bit often beats a smaller model at full precision, and which tools and formats you should use to compress your own models in 2026.
Why LLM compression matters now
The open-source model ecosystem is publishing bigger and bigger models. GLM-5.2 in full precision weighs roughly 1.5 terabytes. Reasoning models like DeepSeek R1 pushed capabilities forward but arrived at sizes that made local deployment nearly impossible for most people. The solution — and the reason tools like Ollama and llama.cpp have become essential infrastructure — is quantization.
At the same time, NVIDIA's Blackwell GPU architecture (including the consumer RTX 5090) has added native hardware support for FP4 computation. The convergence of bigger models needing compression and hardware designed to run compressed models has made quantization the single most important deployment skill in AI engineering.
The core idea: same cost, more intelligence
Compression is fundamentally about getting more intelligence per dollar of compute. Training that used to happen in FP32 (32-bit floating point) now happens in FP4. That's an 8x reduction in memory and bandwidth with, as the NVIDIA model optimizer team puts it, "not much degradation."
The key insight is that not all weights in a neural network matter equally. Language models are trained on massive datasets — often 30 trillion tokens or more — but the training process doesn't saturate every parameter. Many weights end up close to zero and can be safely rounded, quantized, or even set to zero entirely. The trick is knowing which ones to touch and which to leave alone.
Why a bigger model quantized beats a smaller model at full precision
This is one of the most counterintuitive and important findings in the quantization space. The Scaling Laws for Precision paper showed that in compute-matched comparisons, a larger model trained at lower precision can outperform a smaller model at higher precision. In concrete terms: a 120-billion parameter model quantized to 4-bit (taking roughly the same disk space as a 35-billion parameter model at 16-bit) produces meaningfully better outputs.
This happens because model quality scales with parameter count, and quantization degrades quality far less aggressively than you'd expect when done correctly. The "effective parameter count" — a concept from the precision-aware scaling laws — means a 4-bit model retains much of its reasoning capacity even though each parameter carries less information.
The practical takeaway: when choosing between a small model at full precision and a large model quantized to 4-bit, the quantized large model is usually the better choice. You get more layers of reasoning, richer representations, and better generalization — all within the same memory budget.
This also pairs with model routing strategies, where you use a large quantized model for planning and a small fast model for execution. For a deep dive on that approach, see our guide to LLM model routing in 2026.
How quantization actually works: layers, weights, and super weights
A language model has dozens of layers — sometimes 36, 50, or more — and each layer has different importance. The first and last layers are typically the most critical. Middle layers are often more compressible.
Within those layers, not all weights are equal. Two major findings shape how practitioners approach this:
The 1% rule (AWQ): The AWQ paper from MIT (MLSys 2024) showed that protecting just 1% of salient weights can dramatically reduce quantization error. AWQ uses activation patterns to identify which weight channels matter most and scales them up before quantization, then scales back down during inference.
Super weights: The Super Weight paper from Apple and Notre Dame (2024) revealed something even more startling: in models like Llama-7B, a single scalar weight exists that, if pruned, increases perplexity by three orders of magnitude and reduces zero-shot accuracy to random guessing. This single "super weight" — found in the MLP down-projection layer — is more important than the top 7,000 other largest-magnitude weights combined. There are at most six super weights in a typical model, and they must be identified and protected during quantization.
This is why naive "round everything to the nearest 4-bit value" approaches fail catastrophically. The architecture of the model — which layers matter, which weights are super weights, which attention projections are sensitive — must guide the compression strategy.
Dynamic mixed-precision quantization
The state of the art in 2026 is not uniform quantization. It's dynamic mixed-precision: quantize some layers to 1-bit or 2-bit, leave critical layers at 16-bit, and put the majority at 4-bit.
Unsloth's dynamic 4-bit quantization, for example, builds on bitsandbytes by dynamically opting not to quantize certain parameters that would break the model if compressed. Their benchmarks show this approach recovering most of the accuracy lost in standard 4-bit while using only about 10% more VRAM than naive 4-bit.
The NVIDIA model optimizer uses a gradient-based sensitivity analysis combined with a linear programming solver (a knapsack-style approach) to automatically determine which layers get which precision. Attention projection layers and KV-cache layers are kept at higher precision (FP8 or BF16) while other layers go to FP4. The result: less than 1% accuracy degradation across standard benchmarks for large models.
NVFP4: the microscaling format that changed everything
NVFP4 is NVIDIA's 4-bit floating-point format, and its design is more clever than "just use fewer bits." The critical innovation is microscaling: every 16 elements share a single FP8 scaling factor. This means the format can represent values across a wide dynamic range without needing per-element overhead.
The concept originated with bitsandbytes founder Tim Dettmers. NVIDIA adapted the microscaling approach into NVFP4, which is now supported natively in Blackwell GPU tensor cores (5th generation). The RTX 5090 provides over 2x FP4 throughput compared to FP8 on previous-generation hardware.
For practical purposes: NVFP4 lets you take a trillion-parameter model that doesn't fit on any consumer GPU and compress it to a size where it runs locally — with far less quality loss than older 4-bit integer quantization methods. The NVIDIA model optimizer team publishes pre-quantized NVFP4 checkpoints on the Hugging Face Hub, so you don't have to do the quantization yourself.
QLoRA: fine-tuning huge models on a single GPU
QLoRA (Dettmers et al., 2023) cracked the code on fine-tuning massive models without massive hardware. It backpropagates gradients through a frozen 4-bit quantized model into small low-rank adapters (LoRA), reducing memory requirements from over 780GB to under 48GB for a 65-billion parameter model.
The key innovations include 4-bit NormalFloat (an information-theoretically optimal quantization data type for normally distributed weights) and Double Quantization (quantizing the quantization constants themselves to save additional memory).
For practitioners, this means you can fine-tune a 65B model on a single 48GB GPU in about 24 hours. Smaller 7B models can be fine-tuned on a Google Colab T4. The bitsandbytes library makes this accessible: pip install bitsandbytes and a few lines of code let you load any supported model in 4-bit precision ready for LoRA fine-tuning.
If you're starting from an open-source model and want to customize it, read our guide on open-source AI model trust and optimization in 2026 for the broader workflow.
The evaluation problem: accuracy isn't enough
Standard benchmark accuracy is the most common way to verify a quantized model hasn't degraded, but it hides real problems. The "Accuracy is Not All You Need" paper from Microsoft Research (NeurIPS 2024) demonstrated that compressed models with nearly identical accuracy to their baseline can still behave significantly differently in practice. The paper introduced "flips" — answers that change from correct to incorrect (and vice versa) after quantization — and argued that KL-divergence (KLD) is a better metric.
KLD measures the distance between the output logit distributions of the original (BF16) model and the quantized model on a calibration dataset. The goal is to make this distance zero while making the model as small as possible. Unlike accuracy benchmarks, KLD captures how the model's overall behavior shifts — not just whether it gets the right answer on average.
For serious quantization work, both metrics matter: run the standard benchmarks (MMLU, HellaSwag, PIQA, ARC) to confirm broad capability, but also compute KLD on representative prompts to verify behavior hasn't drifted in ways the benchmarks can't detect.
Practical quantization workflow
Here's how to actually compress a model for local or edge deployment:
Start with a pre-quantized checkpoint. For most users, this is the right answer. Unsloth publishes high-quality dynamic quants on Hugging Face. NVIDIA publishes NVFP4 checkpoints via their model optimizer space. Search for
[model name] + "unsloth" or "FP4" or "GGUF"on Hugging Face.Run it locally. Use Ollama (
ollama run [model-name]) or llama.cpp. Both handle GGUF format quantized models out of the box. On Mac or Linux, installation takes minutes.Verify it works. Don't just check benchmarks. Run the model through your actual use case — coding, writing, reasoning, whatever it is. Put it in a coding harness and see if it can complete tasks. Benchmark accuracy tells you the model isn't broken; using it tells you whether it's actually good.
Custom quantize only if needed. For 30B+ parameter models, post-training quantization (PTQ) typically works out of the box. For smaller models (under 20B), you may need quantization-aware training or distillation to recover accuracy. The NVIDIA model optimizer, AutoGPTQ, and AWQ all provide PTQ pipelines.
Consider model routing. Large quantized models are slower (5-10 tokens/second on consumer hardware). Small models are fast (200+ tokens/second). Use the big quantized model for planning and the small model for execution. See our LLM model routing guide for the architecture.
Tools ecosystem
- Ollama — Open-source local LLM runtime. Easiest way to run quantized models. Pulls GGUF files from Hugging Face automatically.
- llama.cpp — The C/C++ inference engine behind nearly every local AI tool. Recently joined Hugging Face (February 2026), promising seamless integration between the transformers library and GGUF quantization.
- bitsandbytes — 8-bit and 4-bit quantization for PyTorch. Powers QLoRA and most Python-based quantization workflows.
- Unsloth — Dynamic 4-bit quantization with higher accuracy than standard BnB 4-bit. Produces some of the highest-quality GGUF quants available.
- NVIDIA Model Optimizer — Produces NVFP4 checkpoints with automated sensitivity analysis. Targets less than 1% accuracy degradation.
- AutoGPTQ — GPTQ quantization pipeline using second-order weight information for better accuracy than naive round-to-nearest.
- AWQ (Activation-aware Weight Quantization) — MIT-developed technique that protects the 1% of salient weights. Works without backpropagation so it generalizes well across domains.
For businesses, the value of compression goes beyond individual model deployment. Companies are distilling mid-size models down to small task-specific models for reranking or classification, cutting millions in compute costs. The tools above make this accessible to teams of any size. If you want to build this into your company's workflow, our multi-agent AI team building guide covers organizational structure.
The challenge: architecture proliferation
In 2023, most models shared a similar "transformer plus" architecture — attention layers, RMS norm, standard activations. Quantization heuristics worked across model families because the internals were similar.
That's no longer true. DeepSeek introduced Multi-Head Latent Attention (MLA). Models now use hybrid attention schemes, linear attention layers, sliding window attention, sparse attention, and mixtures of all of the above. Every model lab experiments with layer configurations, norm epsilon values, activation functions, and attention patterns.
This makes quantization harder. Layers that were safe to aggressively quantize in standard transformers can break with new architectures. Linear attention layers, for example, can pass short-context benchmarks while producing gibberish on long-context tasks after aggressive quantization. The heuristics must be re-derived for each new architecture family.
The open-source ecosystem is adapting — llama.cpp and Ollama now ship default quantizations tuned per model architecture rather than using one-size-fits-all settings. But this is an ongoing challenge that will only get more complex as model architectures continue to diverge.
What's next: where quantization is heading
The panelists at the "Compression at the Edge" session — from Unsloth, Hugging Face, Ollama, and NVIDIA — pointed to several emerging directions:
- Sub-4-bit quantization. Weight-only quantization to 2-3 bits is now common via the GGUF ecosystem, though it requires careful handling for smaller models. The scaling laws suggest we're approaching the practical floor — going below 2 bits forces model sizes to grow disproportionately to maintain loss.
- KV cache compression. Long-context reasoning models demand enormous KV caches. Compressing the KV cache alongside weights is the next frontier for pushing long-horizon tasks to local devices.
- Hardware-native sparsity. NVIDIA's Rubin architecture introduces dynamic activation sparsity, which could combine with quantization for compounding efficiency gains. Sparsity has historically caused more accuracy degradation than quantization, but newer architectures may change that.
- On-device deployment. The panel's shared vision: the best frontier models running on phones and laptops, owned and controlled by the user rather than accessed through API dependencies.
- Lab-side quantization awareness. Model labs are increasingly thinking about quantization during training, not just after. QAT (quantization-aware training) from the labs themselves is becoming more common.
Key takeaways
- Bigger model + aggressive quantization beats smaller model + full precision. A 120B model at 4-bit outperforms a 35B model at 16-bit at similar memory cost.
- Protect super weights. A single scalar weight can determine whether your model generates coherent text or gibberish. Use tools that account for this (Unsloth, NVIDIA model optimizer, AWQ).
- NVFP4 with microscaling is the format of choice for 2026. It's natively supported on Blackwell hardware and delivers the best accuracy-per-bit ratio.
- Evaluate with KLD, not just accuracy. Benchmark accuracy hides behavior changes. KL-divergence captures real degradation.
- Start with pre-quantized checkpoints. Unsloth and NVIDIA publish high-quality quants. Don't quantize yourself unless you have specific requirements.
- Use the right tool for your scenario. Ollama for local inference, bitsandbytes for Python workflows, NVIDIA model optimizer for NVFP4, QLoRA for fine-tuning on limited hardware.
LLM quantization is democratizing access to frontier AI capabilities. As models grow toward 10 trillion parameters, compression isn't optional — it's the bridge between what model labs build and what you can actually run on your own hardware.
Every claim here is traced to a primary source, dated, and listed under Sources. Research and drafting are AI-assisted; editing, verification and publication are human decisions, and a person is accountable for what appears on this page. How we work →

Discussion
0 comments