LLM Roofline
DeepSeek · MIT · HF: deepseek-ai/DeepSeek-R1-Distill-Qwen-32B

DeepSeek-R1 Distill Qwen 32B — VRAM, KV Cache & Hardware Matrix

Serverless API Rate
$0.10 in / $0.30 out per 1M
Parameters
32.8B Dense
Attention
GQA (8 KV / 40 Q)
Layers × Hidden
64 × 5120
Max Native Context
128k tokens
MoE Experts
N/A (Dense)

Quantization Memory Footprint

Quantization BPW Weights Only Total @ 8k Ctx Total @ 32k Ctx Quality
FP16 16.00 62.32 GiB 65.77 GiB 71.77 GiB Lossless Reference
Q8_0 8.50 33.11 GiB 36.56 GiB 42.56 GiB Near-Lossless
Q6_K 6.57 25.59 GiB 29.04 GiB 35.04 GiB High Precision
Q5_K_M 5.69 22.16 GiB 25.61 GiB 31.61 GiB Balanced High
Q4_K_M 4.85 18.89 GiB 22.34 GiB 28.34 GiB Recommended 4-bit
MLX_4BIT 4.50 17.53 GiB 20.98 GiB 26.98 GiB Apple Silicon Optimized
IQ4_XS 4.25 16.55 GiB 20.01 GiB 26.01 GiB Compact 4-bit
Q3_K_M 3.91 15.23 GiB 18.68 GiB 24.68 GiB Aggressive Compression

Hardware Compatibility & Speed Leaderboard (Q4_K_M @ 32k Context)

Hardware Status Total / Limit Decode TTFT (4k) Max Safe Ctx Inspect
Cloud NVIDIA H200 SXM (141 GB) COMFORTABLE 28.3 / 140.4 GiB 139.7 tok/s 0.43s 128k Simulate →
Cloud NVIDIA H100 SXM (80 GB) COMFORTABLE 28.3 / 79.4 GiB 97.5 tok/s 0.43s 128k Simulate →
Cloud NVIDIA A100 SXM (80 GB) COMFORTABLE 28.3 / 79.4 GiB 57.9 tok/s 1.35s 128k Simulate →
NVIDIA RTX PRO 6000 Blackwell (96 GB) COMFORTABLE 28.3 / 95.0 GiB 52.1 tok/s 1.68s 128k Simulate →
Cloud NVIDIA L40S (48 GB) COMFORTABLE 28.3 / 47.4 GiB 24.5 tok/s 1.21s 108k Simulate →
Apple Mac Studio M3 Ultra (256 GB) COMFORTABLE 28.1 / 199.7 GiB 22.1 tok/s 8.35s 128k Simulate →
Apple Mac Studio M3 Ultra (512 GB) COMFORTABLE 28.1 / 399.4 GiB 22.1 tok/s 8.35s 128k Simulate →
2x NVIDIA RTX 3090 Rig (48 GB) COMFORTABLE 28.3 / 46.6 GiB 21.8 tok/s 7.85s 105k Simulate →
Apple Mac Studio M2 Ultra (192 GB) COMFORTABLE 28.1 / 149.8 GiB 21.6 tok/s 9.22s 128k Simulate →
Apple Mac Studio M4 Max (64 GB) COMFORTABLE 28.1 / 49.9 GiB 14.6 tok/s 12.70s 128k Simulate →
Apple Mac Studio M4 Max (128 GB) COMFORTABLE 28.1 / 99.8 GiB 14.6 tok/s 12.70s 128k Simulate →
Apple MacBook Pro M3 Max (64 GB) COMFORTABLE 28.1 / 49.9 GiB 10.5 tok/s 17.02s 128k Simulate →
Apple MacBook Pro M3 Max (128 GB) COMFORTABLE 28.1 / 99.8 GiB 10.5 tok/s 17.02s 128k Simulate →
Apple Mac Mini M4 Pro (48 GB) COMFORTABLE 28.1 / 37.4 GiB 7.0 tok/s 26.24s 88k Simulate →
Apple Mac Mini M4 Pro (64 GB) COMFORTABLE 28.1 / 49.9 GiB 7.0 tok/s 26.24s 128k Simulate →
Ryzen AI Max+ 395 Strix Halo (128 GB) COMFORTABLE 28.1 / 96.0 GiB 6.6 tok/s 9.45s 128k Simulate →
Ryzen AI Max+ 395 Strix Halo (64 GB) COMFORTABLE 28.1 / 48.0 GiB 6.6 tok/s 9.45s 128k Simulate →
Ryzen AI 9 HX 370 Mini-PC (64 GB) COMFORTABLE 28.1 / 48.0 GiB 2.9 tok/s 27.06s 128k Simulate →
NVIDIA RTX 5090 (32 GB) TIGHT 28.3 / 31.0 GiB 50.9 tok/s 2.09s 43k Simulate →
NVIDIA RTX 4090 (24 GB) OOM 28.3 / 23.0 GiB OOM — 11k Simulate →
NVIDIA RTX 5080 (16 GB) OOM 28.3 / 15.0 GiB OOM — OOM Simulate →
NVIDIA RTX 3090 (24 GB Used) OOM 28.3 / 23.0 GiB OOM — 11k Simulate →
NVIDIA RTX 5070 Ti (16 GB) OOM 28.3 / 15.0 GiB OOM — OOM Simulate →
AMD Radeon RX 7900 XTX (24 GB) OOM 28.3 / 23.0 GiB OOM — 11k Simulate →
NVIDIA RTX 5060 Ti (16 GB) OOM 28.3 / 15.0 GiB OOM — OOM Simulate →
NVIDIA RTX 3060 (12 GB) OOM 28.3 / 11.0 GiB OOM — OOM Simulate →
Apple Mac Mini M4 (16 GB) OOM 28.1 / 10.0 GiB OOM — OOM Simulate →
Apple Mac Mini M4 (24 GB) OOM 28.1 / 18.0 GiB OOM — OOM Simulate →

Interactive DeepSeek-R1 Distill Qwen 32B Simulator

32.8B Dense · GQA
1792 GB/s · 250 TFLOPS
3. Weight Quantization 4.85 bpw
4. KV Cache
32,768 tok
Compute Roofline
COMFORTABLE FIT Memory-Bandwidth Bound
Max Safe Ctx: 128k
Memory Allocation Footprint 28.34 / 95.00 GiB usable
Weights: 18.89 GiB KV Cache: 8.00 GiB Overhead: 1.45 GiB Headroom: 66.66 GiB
Decode Speed
52.1
tok/s (batch=1)
Prefill Speed
2490
prompt tok/s
TTFT Latency
1.68s
for 4,096 tok
Active Params
32.8B
of 32.8B total
llama.cpp Server Command
llama-server -hf deepseek-ai/DeepSeek-R1-Distill-Qwen-32B:Q4_K_M -ngl 99 -fa on -c 32768 --port 8080
Context KV Cache Total VRAM Decode Status
4k 1.00 GiB 20.99 GiB 70.5 tok/s COMFORTABLE
8k 2.00 GiB 22.34 GiB 67.1 tok/s COMFORTABLE
16k 4.00 GiB 24.34 GiB 61.3 tok/s COMFORTABLE
32k 8.00 GiB 28.34 GiB 52.1 tok/s COMFORTABLE
64k 16.00 GiB 36.34 GiB 40.2 tok/s COMFORTABLE
128k 32.00 GiB 52.34 GiB 27.6 tok/s COMFORTABLE

Buy-vs-Cloud-vs-API Monthly TCO Break-Even

USE SERVERLESS API
Own Hardware/mo
$167.91
85.5h active + power
Cloud GPU/mo
$181.88
@$1.85/hr spot/pod
Serverless API/mo
$9.50
API cheaper

Engineering FAQ — DeepSeek-R1 Distill Qwen 32B

How much VRAM does DeepSeek-R1 Distill Qwen 32B require in Q4_K_M?

DeepSeek-R1 Distill Qwen 32B weights occupy 18.89 GiB in Q4_K_M. Including 32k FP16 KV cache and runtime buffers, total memory is 28.34 GiB.

What is the cheapest local hardware that runs DeepSeek-R1 Distill Qwen 32B?

NVIDIA RTX PRO 6000 Blackwell (96 GB) (96 GB) runs DeepSeek-R1 Distill Qwen 32B Q4_K_M at ~52.1 tok/s decode and 1.68s TTFT.

How does DeepSeek-R1 Distill Qwen 32B scale KV cache at long context?

DeepSeek-R1 Distill Qwen 32B uses GQA with 8 KV heads across 64 layers (128 head_dim).