Why Can a Loaded Model Run Out of VRAM?
Compare Qwen3-8B on a 12GB GPU at 4k to 32k context and two weight precisions, separating weights, KV cache and prefill peaks.
Analytical estimates, not measurements · 2.5.0 · catalog-2026-11-17
Capacity at Matched Settings
One GPU, 32GB host RAM, one request; each row specifies OS, precision and context or resolution. Peaks are planning estimates, not backend certification. Baseline reports use fixed Q4 / 8k settings, separately from custom scenarios.
| Hardware / Model | Precision / Settings | Weight Memory | Cache / Conditioning | Estimated Peak | Capacity Verdict | Configuration |
|---|---|---|---|---|---|---|
| NVIDIA GeForce RTX 3060 (12GB) Qwen3-8B | Q4_K_M · windows 4096 tokens · FP16 KV | 4.99 GB | 0.6 GB | 7.06 GB | Estimated Memory Fit | AdjustBaseline Report |
| NVIDIA GeForce RTX 3060 (12GB) Qwen3-8B | Q4_K_M · windows 16384 tokens · FP16 KV | 4.99 GB | 2.39 GB | 9.82 GB | Estimated Memory Fit | AdjustBaseline Report |
| NVIDIA GeForce RTX 3060 (12GB) Qwen3-8B | Q4_K_M · windows 32768 tokens · FP16 KV | 4.99 GB | 4.77 GB | 13.51 GB | Prefill OOM Risk | AdjustBaseline Report |
| NVIDIA GeForce RTX 3060 (12GB) Qwen3-8B | Q8_0 · windows 32768 tokens · FP16 KV | 9.29 GB | 4.77 GB | 17.81 GB | VRAM Shortfall / Offload Unverified | AdjustBaseline Report |
Weight and Cache Precision Are Separate
Q4_K_M weights do not imply a 4-bit KV cache. Standard GQA cache depends on layers, KV heads, head dimension, cache bytes, context and concurrency. These scenarios hold the cache at FP16 to isolate the effects.
Loading Does Not Test Prefill Peaks
A short successful prompt does not prove that a full context will work. Runtime buffers and kernels change peaks. Our prefill model still needs empirical calibration; the projected peak is a planning warning, not an OOM guarantee.
Increase Workload Gradually and Keep Logs
Start with one request and a short context, then increase prompt length gradually. Record the model file, runtime version, cache type, prompt and output token counts, and peak memory. Check backend and hardware support before enabling lower-precision caches.
Related GPU and Model Topics
Sources and Limits
A config check is not a checkpoint, runtime or speed measurement. Quantization implementations change actual memory use; validate the full workload before deployment.
- Qwen/Qwen3-8B2026-11-11 · Config checked