Short answer: Qwen’s official Qwen3-4B GGUF repository publishes a 2.50GB Q4_K_M, 2.82GB Q5_0, 2.89GB Q5_K_M, 3.31GB Q6_K and 4.28GB Q8_0. Four gigabytes can target the official Q4 through selected Q6 files only with a bounded cache and verified runtime overhead; 6GB adds practical room; 8GB supports Q8_0 or longer context more credibly.
Exact model: this guide covers the dense post-trained Qwen/Qwen3-4B, whose official full-precision repository displays 8.06GB. It is distinct from Qwen3-Embedding-4B, Qwen3-4B-Base and other fine-tunes or conversions that may have different tasks, templates or files.
Official Qwen3-4B files
| Official artifact | Displayed size | Capacity implication before overhead |
|---|---|---|
| Q4_K_M GGUF | 2.50GB | 4GB starting path with limited room for cache and runtime state |
| Q5_0 GGUF | 2.82GB | Can target 4GB only with a tightly bounded allocation |
| Q5_K_M GGUF | 2.89GB | Similar 4GB constraint; 6GB provides more practical margin |
| Q6_K GGUF | 3.31GB | Very tight on 4GB before useful cache; stronger 6GB target |
| Q8_0 GGUF | 4.28GB | Already exceeds a 4GB pool; 6GB is possible only with controlled context |
| Full-precision repository | 8.06GB | Exceeds an 8GB label before runtime allocations |
Repository display sizes are artifact sizes, not peak-memory measurements. Metadata, mapping, kernels, graph buffers, scratch space and display use can increase the live allocation.
Architecture and context fields
| Official field | Value | Why it matters |
|---|---|---|
| Model type | Dense Qwen3-4B | All weights must be resident or offloaded |
| Layers | 36 | Multiplies cache state per sequence |
| Attention / KV heads | 32 / 8 | Grouped-query attention reduces KV state versus 32 KV heads |
| Head dimension | 128 | Published directly in the configuration |
| Configuration positions | 40,960 | Published config field |
| Qwen announcement context | 32K | Model capability, not a promise that the full allocation fits a small GPU |
KV-cache payload at 4K, 8K, 32K and 40K
For one sequence with FP16 key/value entries, use 2 × 36 layers × 8 KV heads × 128 head dimension × 2 bytes × token slots.
| Allocated token slots | Illustrative FP16 K+V payload | Planning consequence |
|---|---|---|
| 4,096 | 0.5625GiB | Already material on a 4GB device after a 2.5GB–3.3GB file |
| 8,192 | 1.125GiB | Makes Q5/Q6 combinations tight on a 4GB label |
| 32,768 | 4.5GiB | Cache alone exceeds a 4GB pool at FP16 precision |
| 40,960 | 5.625GiB | Configuration-scale cache exceeds common 4GB and 6GB labels before weights |
This is architecture arithmetic, not a measured peak. Quantized cache, paging, batch size, concurrency, alignment and runtime implementation can materially change the allocation.
Can Qwen3-4B run on 4GB?
The official Q4_K_M is the clearest 4GB path. A 4K illustrative FP16 cache brings the file-plus-cache subtotal to roughly 3.06GB before runtime buffers, while 8K brings it to about 3.63GB. Q5 files can fit only with less margin, and Q6_K becomes highly sensitive to cache precision, context allocation and display use. Q8_0 exceeds the nominal pool before any cache.
What does 6GB change?
Six gigabytes gives Q4 through Q6 useful working room and can target Q8_0 with a modest cache. It still does not turn 32K into an automatic fit: Q8_0 plus the illustrative 4.5GiB FP16 cache exceeds 6GB by a wide margin before other allocations.
What does 8GB change?
Eight gigabytes is the practical tier for Q8_0, longer context, larger batches or runtime margin. The official full-precision repository is 8.06GB, so full precision is not an all-on-device 8GB plan. At 32K, even Q4_K_M plus the illustrative FP16 cache approaches 7GiB before runtime overhead.
Thinking mode affects token demand
Qwen3’s thinking and non-thinking modes use the same weights, so mode selection does not change the artifact size. Reasoning responses can consume more output tokens and retained context, however. Set a maximum output and test both modes with representative prompts before finalizing hardware or cache settings.
A reproducible Qwen3-4B test
- Record the exact official artifact, revision, runtime and version.
- Record device model, visible memory, display use and offload split.
- Fix prompt tokens, output limit, cache precision, batch and concurrency.
- Test thinking and non-thinking workloads separately.
- Measure peak device and host memory for the complete request.
- Record prompt processing, generation speed and time to first token separately.
- Evaluate output quality on identical prompts before choosing a quantization.
Vision-language sibling: the Qwen3-VL 4B VRAM guide adds a separate projector, DeepStack vision features and multimodal workload checks.
Smaller vision-language sibling: the Qwen3-VL 2B guide maps complete official multimodal artifacts to 4GB, 6GB and 8GB planning.
Sources and limits
- Official Qwen3-4B GGUF repository and artifact sizes
- Official Qwen3-4B repository
- Official Qwen3-4B configuration
- Official Qwen3 announcement
- HighVRAM methodology
Reviewed October 25, 2026. Artifact sizes, architecture and context fields come from Qwen’s official repositories and announcement. Cache figures are transparent architecture arithmetic, not measured peak-memory claims. HighVRAM has not independently benchmarked every runtime and device. Fit does not establish speed, output quality or value.
Compare the dense Qwen3 family
The Qwen3 family VRAM guide compares official 4B, 8B, 14B and 32B files in one capacity map.
Comparing another dense 4B model? Read the Gemma 3 4B VRAM guide for Google’s official QAT model/projector sizes and multimodal planning.
Newer multimodal comparison: Qwen3.5-4B uses hybrid attention and includes a vision path; do not transfer Qwen3-4B cache or artifact assumptions.
Newer smaller multimodal option: Qwen3.5-2B uses hybrid attention and a vision path; do not transfer Qwen3-4B cache or artifact assumptions.
Smaller multimodal option: Qwen3.5-0.8B uses hybrid attention and a vision path; validate task quality rather than inferring suitability from size.