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 / ModelPrecision / SettingsWeight MemoryCache / ConditioningEstimated PeakCapacity VerdictConfiguration
NVIDIA GeForce RTX 3060 (12GB)
Qwen3-8B
Q4_K_M · windows
4096 tokens · FP16 KV
4.99 GB0.6 GB7.06 GBEstimated Memory FitAdjustBaseline Report
NVIDIA GeForce RTX 3060 (12GB)
Qwen3-8B
Q4_K_M · windows
16384 tokens · FP16 KV
4.99 GB2.39 GB9.82 GBEstimated Memory FitAdjustBaseline Report
NVIDIA GeForce RTX 3060 (12GB)
Qwen3-8B
Q4_K_M · windows
32768 tokens · FP16 KV
4.99 GB4.77 GB13.51 GBPrefill OOM RiskAdjustBaseline Report
NVIDIA GeForce RTX 3060 (12GB)
Qwen3-8B
Q8_0 · windows
32768 tokens · FP16 KV
9.29 GB4.77 GB17.81 GBVRAM Shortfall / Offload UnverifiedAdjustBaseline 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.

Methods and Assumptions