Qwen3-4B
Qwen checkpoint Qwen/Qwen3-4B at revision 1cfa9a720891. Architecture qwen3, attention gqa, calculator support full.
Total parameters: 4,000,000,000.
Layers 36, query heads 32, KV heads 8, head dim 128, recorded context 40,960 tokens.
Fetched 2026-09-19, verified 2026-09-19. Completeness: complete.
Memory by quantization and context
Concurrent sequences = 1. KV cache defaults to FP16. Range includes documented runtime extras for the listed engine. These HTML figures use the same core as the interactive calculator.
| Quantization | 2,048 tokens | 8,192 tokens | 32,768 tokens |
|---|---|---|---|
| BF16 safetensors | 8.40 GiB–10.28 GiB | 9.24 GiB–11.15 GiB | 12.62 GiB–14.63 GiB |
| GGUF Q4_K_M | 2.73 GiB–3.16 GiB | 3.58 GiB–4.08 GiB | 6.95 GiB–7.69 GiB |
| GGUF Q8_0 | 4.39 GiB–4.85 GiB | 5.24 GiB–5.77 GiB | 8.61 GiB–9.38 GiB |
| INT4 theoretical | 2.27 GiB–2.87 GiB | 3.11 GiB–3.79 GiB | 6.49 GiB–7.40 GiB |
Sources
Calculator
Estimate
Unknown
Missing budget, incomplete data, or a deployment mode this version cannot judge.
Estimated memory range: 3.58 GiB – 4.08 GiB
Weights use selected file metadata. Runtime extras are still estimated.
Software compatibility
Documented support. Enough memory does not mean this engine, quant, and OS will run. Support does not mean it will be fast.
Assumptions that affect this result
- Full-resident weight estimates use total parameters, including inactive MoE experts.
- Weight bytes come from the selected weight files only, not from every file in the repository.
- Download file size is not peak GPU memory. Runtime layout, allocator padding, and KV are extra.
- Counted files: Qwen3-4B-Q4_K_M.gguf.
- Context budget is the number of cached tokens per sequence (prompt plus reserved generation).
- Concurrent sequences share one model replica; weights are not multiplied by sequence count.
- KV dtype is independent of weight quantization unless you change it.
- Using 8 KV heads, not 32 query heads.
- Prefill peak and steady decode occupancy are not the same. The high scenario is closer to prefill/workspace pressure.
- Engine reserve is not the same as bytes the model actually uses for weights and KV.
- llama.cpp compute buffers grow with context and batch. Values here are user-adjustable scenarios, not measured traces — unless a matching calibration is shown.