Will It Fit?
Estimate text inference VRAM across Transformers and vLLM with a compact, explainable breakdown.
Model pages and release notes are included here too.
Qwen 3 4B · vLLM · Official BF16 checkpoint
Required GPU VRAM (0.9 budget)
11.0 GB
Core estimate: 9.9 GB. Against RTX 4090 24GB, this leaves 14.7 GB of headroom.
At 4,096 tokens, the estimated max concurrency is 34 concurrent requests.
Quick read
Selected GPU
Runtime
Load dtype
GPU utilization
GPU count
KV cache dtype
Context length
Current concurrency
Max concurrency @ context
Class
Bandwidth
Nominal VRAM
Core estimate
Required GPU VRAM (0.9 budget)
Headroom
GPU compare
What fits this setup
Breakdown
Where the memory goes
Weights
4B resident parameters at 2.01 bytes each. Calibrated from the official checkpoint profile.
8.0 GB
KV cache
Concurrency 1, context 4,096, 36 KV-bearing layers, 8 KV heads, BF16 cache storage.
0.4 GB
Runtime / safety overhead
Conservative buffer for allocator fragmentation, kernels, and runtime scratch space.
1.5 GB
Weights = parameter count × bytes per parameter.
KV cache grows with context length, KV-bearing layers, concurrent requests, and the selected KV cache dtype.
Show the substituted formulas
Weights
parameter count × bytes per weight
4B × 2.01 = 8.0 GB
The official Qwen3-4B safetensor weights total about 8.04 GB on Hugging Face.
KV cache
batch × effective KV tokens across attention layers × 2 × KV heads × head dim × bytes per KV element
1 × 147,456 × 2 × 8 × 80 × 2 = 0.4 GB
Longer context, deeper models, and larger batches all expand the cache linearly. BF16 controls the bytes per stored KV element.
Overhead
max(1.5 GB, 10% of weights + KV cache + linear state)
max(1.5 GB, 10% of 8.4 GB) = 1.5 GB
This leaves room for runtime buffers instead of claiming an unrealistically exact fit.
Model
Selected model
Qwen 3 4B
4B dense • 131,072 context • 8 KV heads
Total params
Active params
Layers
Hidden size
Attention heads
KV heads
KV-bearing layers