From Q2 to FP32 -- When to Use Each, Hardware Trade-offs, and CLI Verification
Understanding Q2 through FP32 -- Bits, Blocks, and Trade-offs
Quantization is the process of reducing the precision of neural network weights from high-precision floating-point (FP32/FP16) to lower-bit integer representations (INT8, INT4, etc.). This reduces model file size, VRAM requirements, and inference latency -- but at the cost of model quality. This guide covers every common quantization level, their real-world trade-offs, hardware requirements, and command-line tools for verification.
A "quant" refers to the number of bits used to represent each weight in a neural network. The original training is done in FP32 (32-bit floating point) or BF16 (16-bit bfloat). Quantization compresses these weights to fewer bits:
The K-suffix (Q4_K_S, Q4_K_M, Q5_K_M, etc.) refers to the k-quants method developed by Kawrakow for llama.cpp/GGUF. It uses a block-based quantization approach where weights are grouped into blocks and each block gets its own scaling factor:
Quantized models are distributed in several container formats. The format determines which inference engine you use:
Each format has different tooling, hardware requirements, and quality characteristics:
| Format | Engine | Hardware | Bit Levels | Best For |
|---|---|---|---|---|
| GGUF | llama.cpp, Ollama, LM Studio, KoboldCpp | CPU, GPU (CUDA/Metal/Vulkan) | Q2_K through Q8_0, FP16 | General-purpose. CPU inference. Mixed CPU+GPU. Most flexible. |
| GPTQ | AutoGPTQ, vLLM, Text Gen WebUI | GPU only (CUDA) | INT4 (primary), INT3, INT8 | Fast GPU inference. Server deployments with vLLM. |
| AWQ | vLLM, HuggingFace transformers | GPU only (CUDA) | INT4 (primary) | Best INT4 quality on GPU. Production serving with vLLM. |
| EXL2 | ExLlamaV2, TabbyAPI | GPU only (CUDA) | Variable (2.5-8.0 bpw) | Maximum quality at target file size. Fine-grained control. |
| FP16/BF16 | All engines | GPU (recommended) | 16-bit (no quantization) | Maximum quality. When VRAM is not a constraint. |
| FP32 | PyTorch, HuggingFace | GPU or CPU | 32-bit (training precision) | Training, fine-tuning, research. Never needed for inference. |
Here is every common quantization level with real-world characteristics. File sizes and VRAM are approximate for a 7B parameter model (FP16 baseline ~14GB):
| Level | Bits/Weight | ~Size (7B) | ~VRAM (7B) | Quality | Use When |
|---|---|---|---|---|---|
| FP32 | 32.0 | ~28 GB | ~30 GB | 100% (baseline) | Never for inference. Training only. |
| FP16 / BF16 | 16.0 | ~14 GB | ~15 GB | 100% (no loss) | You have ample VRAM. Maximum quality inference. |
| Q8_0 | 8.5 | ~7.5 GB | ~8.5 GB | ~99% (near-lossless) | You have enough VRAM. Want near-perfect quality with 50% reduction. |
| Q6_K | 6.6 | ~5.8 GB | ~7 GB | ~98% | Quality priority with some VRAM savings over Q8. |
| Q5_K_M | 5.7 | ~5.0 GB | ~6 GB | ~97% | Good balance. Slightly better than Q4, moderate VRAM. |
| Q4_K_M | 4.8 | ~4.2 GB | ~5.5 GB | ~96% (RECOMMENDED) | The sweet spot. Best quality-to-size ratio for most users. |
| Q4_K_S | 4.5 | ~3.9 GB | ~5 GB | ~95% | Slightly smaller than Q4_K_M. Marginal quality loss. |
| Q4_0 | 4.5 | ~3.9 GB | ~5 GB | ~94% | Legacy. Use Q4_K_M instead unless you need max speed. |
| Q3_K_M | 3.9 | ~3.4 GB | ~4.5 GB | ~92% | VRAM-constrained. Noticeable quality drop in complex reasoning. |
| Q3_K_S | 3.4 | ~3.0 GB | ~4 GB | ~90% | Tight VRAM. Expect degraded output quality. |
| Q2_K | 2.6 | ~2.3 GB | ~3.5 GB | ~85% (significant loss) | Emergency only. Model will produce lower-quality, more repetitive text. |
| IQ2_XXS | 2.1 | ~1.8 GB | ~3 GB | ~80% (severe loss) | Extreme edge cases. Requires imatrix. Quality is notably degraded. |
| IQ1_S | 1.6 | ~1.4 GB | ~2.5 GB | ~70% (experimental) | Experimental. Barely usable. Research purposes only. |
Quality loss from quantization is not uniform across all tasks. Here is what degrades first:
To estimate VRAM needed for a model:
Minimum VRAM to load the model with a 4K context window (using GGUF with GPU offload):
| Model Size | Q2_K | Q3_K_M | Q4_K_M | Q5_K_M | Q6_K | Q8_0 | FP16 |
|---|---|---|---|---|---|---|---|
| 1.5B | ~1.3 GB | ~1.6 GB | ~1.8 GB | ~2.0 GB | ~2.3 GB | ~2.7 GB | ~4.5 GB |
| 3B | ~2.3 GB | ~2.8 GB | ~3.2 GB | ~3.6 GB | ~4.1 GB | ~4.8 GB | ~7.5 GB |
| 7B | ~3.5 GB | ~4.5 GB | ~5.5 GB | ~6.0 GB | ~7.0 GB | ~8.5 GB | ~15 GB |
| 8B | ~4.0 GB | ~5.0 GB | ~6.0 GB | ~6.8 GB | ~7.8 GB | ~9.5 GB | ~17 GB |
| 13B | ~6.0 GB | ~7.5 GB | ~9.0 GB | ~10.5 GB | ~12.0 GB | ~14.5 GB | ~27 GB |
| 14B | ~6.5 GB | ~8.0 GB | ~9.5 GB | ~11.0 GB | ~12.5 GB | ~15.5 GB | ~29 GB |
| 32B | ~12.5 GB | ~15.5 GB | ~19 GB | ~22 GB | ~25 GB | ~31 GB | ~63 GB |
| 70B | ~25 GB | ~31 GB | ~38 GB | ~44 GB | ~50 GB | ~62 GB | ~140 GB |
| 120B | ~42 GB | ~52 GB | ~63 GB | ~73 GB | ~83 GB | ~103 GB | ~240 GB |
When no GPU is available, GGUF models run entirely on CPU. Performance depends heavily on:
lscpu | grep avx.Typical CPU-only speeds (7B Q4_K_M):
Lower bit quantization is not just smaller -- it is also faster. Less data to move from memory to compute:
| Quant | Relative Speed (GPU) | Relative Speed (CPU) | Notes |
|---|---|---|---|
| FP16 | 1.0x (baseline) | 1.0x (baseline) | Full precision. Slowest, largest. |
| Q8_0 | ~1.3x | ~1.5x | Good speedup with minimal quality loss. |
| Q6_K | ~1.5x | ~1.7x | Excellent balance. |
| Q5_K_M | ~1.7x | ~2.0x | Strong speedup, good quality. |
| Q4_K_M | ~2.0x | ~2.3x | Best speed/quality ratio. |
| Q3_K_M | ~2.2x | ~2.5x | Faster but quality degrades. |
| Q2_K | ~2.5x | ~2.8x | Fastest but significant quality loss. |
Step 1: Check your VRAM. Look at the VRAM table above. Find the largest model you can fit at Q4_K_M. This is your starting point.
Step 2: Consider your use case.
| Use Case | Recommended Quant | Why |
|---|---|---|
| Casual chat / general Q&A | Q4_K_M | Quality is more than good enough. Fast and small. |
| Code generation | Q5_K_M or Q6_K | Code requires precision. Q4 can introduce subtle syntax errors on edge cases. |
| Mathematical reasoning | Q6_K or Q8_0 | Math degrades fastest under quantization. Higher precision needed. |
| Creative writing / storytelling | Q4_K_M or Q5_K_M | Creative tasks are more forgiving of quantization. Quality difference is subtle. |
| Production / enterprise deployment | Q8_0 or FP16 | When quality is critical and you cannot afford any degradation. Use AWQ with vLLM for GPU. |
| RAG / document analysis | Q4_K_M | Retrieval quality matters more than generation precision. Q4 is sufficient. |
| Running on a server with 80GB+ GPU | FP16 or BF16 | No reason to quantize if you have the VRAM. Maximum quality. |
| Running on 8GB GPU | Q4_K_M (7B model) | Fits comfortably. Good speed and quality. |
| Running on 4GB GPU | Q3_K_M (7B) or Q4_K_M (3B) | Tight VRAM. Choose smaller model at Q4 over larger at Q3 when possible. |
| CPU-only (16GB RAM) | Q4_K_M (7B) | Fits in RAM. CPU inference at 10-20 tok/sec. |
| CPU-only (8GB RAM) | Q3_K_S (7B) or Q4_K_M (3B) | Limited RAM. Prefer smaller model at higher quant. |
| Edge device / Raspberry Pi | Q2_K (1.5B or 3B model) | Extreme constraints. Use smallest model at lowest viable quant. |
How to check what quantization a model is actually using. This is critical when downloading models -- filenames can be misleading, and you need to verify before running.
The general.file_type field in GGUF metadata maps to these values:
| Value | Quantization Type | Bits Per Weight |
|---|---|---|
| 0 | FP32 | 32.0 |
| 1 | FP16 | 16.0 |
| 2 | Q4_0 | 4.5 |
| 3 | Q4_1 | 5.0 |
| 6 | Q5_0 | 5.5 |
| 7 | Q5_1 | 6.0 |
| 8 | Q8_0 | 8.5 |
| 9 | Q8_1 | 9.0 |
| 10 | Q2_K | 2.6 |
| 11 | Q3_K_S | 3.4 |
| 12 | Q3_K_M | 3.9 |
| 13 | Q3_K_L | 4.3 |
| 14 | Q4_K_S | 4.5 |
| 15 | Q4_K_M | 4.8 |
| 16 | Q5_K_S | 5.5 |
| 17 | Q5_K_M | 5.7 |
| 18 | Q6_K | 6.6 |
Source: Avondale.AI Technical Documentation Library
Category: Core AI Concepts
Type: Technical Reference Guide
License: CC BY 4.0
Suggested Citation:
Model Quantization: The Complete Technical Guide. Avondale.AI Technical Documentation Library. Accessed June 2026. https://avondale.ai/technical/model-quantization-guide.html