ai-automation
DeepSeek-R1 FP8 vs Q4: VRAM Benchmarks & Speed Guide (2026)

On This Page (13 sections)
Planning to run quantized DeepSeek, LLaMA 3, or Mistral locally? Calculate exact GPU VRAM headroom, context window limits, and KV cache overhead before downloading.
try the free VRAM calculator tool →Choosing a DeepSeek R1 quantization before you download it prevents a common local-inference failure: the model fits on disk but not in GPU memory once the runtime allocates the KV cache. In this guide, I separate model-weight estimates from runtime memory, explain what FP8, Q4_K_M, and Q8_0 mean, and show the Ollama and llama.cpp settings that control the tradeoff.
Note on scope: DeepSeek R1 comes in two forms: the full 671B MoE model (requires a multi-GPU server) and the Distill models (1.5B to 70B, designed for local consumer hardware). This guide focuses on the distill models since those are what most people actually run locally.
What Quantization Actually Does
When a language model trains, its weights are stored as 32-bit or 16-bit floating point numbers. Quantization compresses each weight into fewer bits to reduce memory footprint.
The tradeoff is precision loss: the fewer bits you use, the more rounding error accumulates across billions of parameters — and the more the model outputs can drift from the full-precision reference.
The GGUF format (used by llama.cpp and Ollama) supports many quantization levels. For DeepSeek R1 distill models, the most relevant are:
| Format | Bits/weight | Description |
|---|---|---|
| Q4_K_M | ~4.5 avg | 4-bit k-means, medium variant — community sweet spot |
| Q5_K_M | ~5.5 avg | 5-bit k-means — good VRAM-to-quality balance |
| Q8_0 | ~8 avg | 8-bit integer — near-lossless, highest quality before FP16 |
| FP8 | 8-bit float | Better dynamic range than Q8_0; requires FP8 CUDA build |
| FP16 | 16 | Maximum quality, maximum VRAM cost |
Q4_K_M vs Q4_0: The
_K_Msuffix means k-means quantization with a medium calibration dataset. It is meaningfully better quality than the olderQ4_0at the same VRAM cost. Always preferQ4_K_MoverQ4_0.
⚡ Try the Interactive Tool: Don’t want to calculate KV cache and weight memory by hand? Use our free Local AI VRAM & Quantization Calculator to select your exact GPU (RTX 4060, 4090, Apple Silicon M-series) and get real-time memory headroom plus copy-paste
ollamacommands.
Estimated VRAM Table: DeepSeek R1 Distill Models
These are planning estimates based on parameter count and common GGUF weight sizes, cross-checked against the Ollama DeepSeek R1 model card. They are model weights only. Add runtime overhead and KV-cache memory; a 1–3 GB allowance is a starting estimate, not a guarantee for every context length or backend.
| Model | Q4_K_M VRAM | Q8_0 VRAM | Recommended GPU |
|---|---|---|---|
| 1.5B | ~1.1 GB | ~1.9 GB | Any GPU (even iGPU) |
| 7B | ~5.0 GB | ~8.4 GB | RTX 3060 8 GB+ |
| 8B | ~5.4 GB | ~9.1 GB | RTX 3060 12 GB / 4060 8 GB |
| 14B | ~9.5 GB | ~16.8 GB | RTX 3080 10 GB / 4070 12 GB |
| 32B | ~21 GB | ~37 GB | RTX 4090 (24 GB) for Q4; multi-GPU for Q8 |
| 70B | ~43 GB | ~78 GB | Multi-GPU / A100 80 GB |
Full 671B MoE model: FP8 requires approximately 700 GB of VRAM, Q8_0 requires 350–400 GB, Q4_K_M requires 200–220 GB. This is a multi-GPU server workload. Use the Distill models above for local inference.
Quality vs Speed Tradeoffs: What the Numbers Predict
Quantization changes memory traffic and the amount of rounding error, but it does not produce one universal tokens-per-second result. Backend, GPU architecture, context length, batch size, offload layers, and thermal limits all change the measured speed. Treat any benchmark that omits those conditions as a rough comparison rather than a promise.
- Q4_K_M usually gives the smallest weight footprint and leaves the most room for KV cache. It is the practical starting point for an 8 GB card, but long contexts can still spill to system RAM.
- Q5_K_M trades some of that headroom for a smaller precision loss. Use it when the model fits with comfortable memory margin and you care about preserving more detail.
- Q8_0 keeps more information per weight but can consume almost twice the weight memory of Q4. It is useful when the GPU has the capacity or when a quality comparison justifies the cost.
- FP8 uses floating-point scaling and needs a backend with compatible CUDA support. It is not automatically faster than Q8_0 on consumer hardware.
For a reproducible local comparison, record the GPU model, driver, backend version, model file hash, context length, prompt, generated token count, and peak VRAM. Run the same prompt three times after the model is warm, then report the median tokens per second. Without those details, a claimed “28 tokens per second” is not portable evidence.
Bottom line: For coding, summarization, and general Q&A, Q4_K_M is the right default. Move to Q5_K_M or Q8_0 only if you need tighter math/reasoning accuracy and have the VRAM.
Running DeepSeek R1 Distill with Ollama
Ollama selects the best GGUF quantization it can fit in your available VRAM automatically. You can override it explicitly.
Pull a specific model and quantization
# 7B distill, default (Ollama picks best fit)
ollama pull deepseek-r1:7b-qwen-distill-q4_K_M
# 8B distill, explicit Q4_K_M
ollama pull deepseek-r1:8b-0528-qwen3-q4_K_M
# 14B distill, Q8_0 (requires ~17 GB VRAM)
ollama pull deepseek-r1:14b-qwen-distill-q8_0
Run interactively
ollama run deepseek-r1:8b-0528-qwen3-q4_K_M
Cap context to reduce KV cache pressure on 8 GB cards
ollama run deepseek-r1:7b-qwen-distill-q4_K_M --num-ctx 4096
Ollama’s default context for DeepSeek R1 can be very large. On 8 GB cards, setting --num-ctx 4096 or --num-ctx 8192 prevents out-of-memory crashes during long conversations. See our full guide on running DeepSeek R1 on 8GB VRAM for Modelfile tuning options.
Running DeepSeek R1 Distill with llama.cpp
Download a GGUF file from HuggingFace (for example, bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF).
Download via HuggingFace CLI
pip install huggingface_hub
huggingface-cli download bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF \
DeepSeek-R1-Distill-Qwen-7B-Q4_K_M.gguf \
--local-dir ./models
Run inference
./llama-cli \
-m ./models/DeepSeek-R1-Distill-Qwen-7B-Q4_K_M.gguf \
-n 512 \
-ngl 35 \
--ctx-size 4096 \
-p "Explain the difference between Q4_K_M and Q8_0 quantization."
Key flags:
-ngl 35— number of layers offloaded to GPU. For a 7B Q4_K_M model on 8 GB,-ngl 35offloads almost all layers.--ctx-size 4096— context window. Keep low on 8 GB cards.-n 512— max tokens to generate.
Verify GPU offloading
./llama-cli -m ./models/DeepSeek-R1-Distill-Qwen-7B-Q4_K_M.gguf \
--n-gpu-layers 999 --ctx-size 2048 -p "test" 2>&1 | grep "offloaded"
If you see offloaded 0/32 layers, your llama.cpp build was not compiled with CUDA support.
Fixing Tool Calling Issues
If you are using the distill models for agentic tasks, the thinking tokens (<think>...</think>) in DeepSeek R1 outputs can break JSON tool-call parsers. We have a dedicated guide: Fix DeepSeek R1 Tool Calling in Ollama (Thinking Budget).
For a second local-inference comparison, see the Ollama GPU-offload and context-size guide. It covers the same failure mode from the runtime side: a model can load successfully, then exhaust VRAM when the context grows.
Quick Reference: Which Quantization for Your GPU
| Your GPU VRAM | Best model choice |
|---|---|
| 4–6 GB | 1.5B (any quant) or 7B Q4_K_M with low ctx |
| 8 GB | 7B Q4_K_M or 8B Q4_K_M with --num-ctx 4096 |
| 12 GB | 8B Q8_0 or 14B Q4_K_M |
| 16–24 GB | 14B Q8_0 or 32B Q4_K_M |
| 24 GB (4090) | 32B Q4_K_M (tight) or 14B Q8_0 (comfortable) |
When in doubt, start with Q4_K_M and leave at least 1.5 GB of VRAM headroom after loading — that buffer is used by the KV cache and prevents out-of-memory errors during generation.
Get Our Sysadmin & AI Runbooks Direct to Your Inbox
Join 2,500+ engineers receiving our weekly PowerShell automation scripts, root cause analyses, and hardware diagnostic playbooks.
Frequently Asked Questions: DeepSeek-R1 FP8 vs Q4: VRAM Benchmarks & Speed Guide (2026)
What is the difference between Q4_K_M and Q8_0 quantization?
Can you run DeepSeek R1 7B or 8B on 8GB VRAM?
What does FP8 quantization mean for DeepSeek R1?
Which DeepSeek R1 quantization gives the best quality-to-VRAM ratio?
Official Technical References
- Ollama DeepSeek R1 model card — Ollama
- llama.cpp quantization documentation — llama.cpp
- HuggingFace GGUF model cards — bartowski/DeepSeek-R1-Distill — Hugging Face
Add PraveenTechWorld as a preferred source in your Google Search results.
Explore more: Browse all ai automation guides or check related articles below.


