Qwen3-4B-Instruct-2507 VRAM & Memory Requirements
The Qwen/Qwen3-4B-Instruct-2507 checkpoint ships BF16 safetensors of 8,045,591,552 bytes (7.49 GiB / 8.05 GB) in this catalog. That download size is not peak GPU memory, and the figures below are estimates.
Specific checkpoints with sourced architecture and weight files. GGUF Q4_K_M (Unsloth): 3.58 GiB–4.08 GiB at 8,192 tokens, 1 sequence, FP16 KV, llama.cpp.
Publisher and provenance
- PublisherQwen
- Hugging Face
Qwen/Qwen3-4B-Instruct-2507 - Revision
cdbee75f17c01a7cc42f958dc650907174af0554 - Total parameters4,022,468,096
- Layers36
- Query heads32
- KV heads8 (gqa)
- Head dimension128
- Recorded context capability262,144
- Completenesscomplete · full
Memory layers in this estimate
Artifact bytes, raw KV, engine extras, and total demand are separate. This is not a runtime trace.
- Weight artifact
- 2.33 GiB (2,497,281,120 bytes)
- Raw KV cache
- 1.13 GiB (1,207,959,552 bytes)
- Engine extras / workspace
- 0.13 GiB–0.63 GiB
- Total estimated demand
- 3.58 GiB–4.08 GiB
Published artifacts
| Quantization | Selected files | Bytes | Engine | Evidence |
|---|---|---|---|---|
| BF16 safetensors bf16 | model-00001-of-00003.safetensors, model-00002-of-00003.safetensors, model-00003-of-00003.safetensors | 8,045,591,552 (7.49 GiB / 8.05 GB) | vllm, sglang, unspecified | file-metadata |
| GGUF Q4_K_M (Unsloth) gguf-q4_k_m | Qwen3-4B-Instruct-2507-Q4_K_M.gguf | 2,497,281,120 (2.33 GiB / 2.50 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q5_K_M (Unsloth) gguf-q5_k_m | Qwen3-4B-Instruct-2507-Q5_K_M.gguf | 2,889,514,080 (2.69 GiB / 2.89 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q6_K (Unsloth) gguf-q6_k | Qwen3-4B-Instruct-2507-Q6_K.gguf | 3,306,261,600 (3.08 GiB / 3.31 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q8_0 (Unsloth) gguf-q8_0 | Qwen3-4B-Instruct-2507-Q8_0.gguf | 4,280,405,600 (3.99 GiB / 4.28 GB) | llama.cpp, ollama, unspecified | file-metadata |
| INT4 theoretical | No published file | 2,011,234,048 (theoretical) | — | theoretical |
Memory by quantization and context
Concurrent sequences = 1. KV defaults to FP16. The range includes documented runtime extras for the listed engine. These 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 (Unsloth) | 2.73 GiB–3.16 GiB | 3.58 GiB–4.08 GiB | 6.95 GiB–7.69 GiB |
| GGUF Q5_K_M (Unsloth) | 3.10 GiB–3.53 GiB | 3.94 GiB–4.45 GiB | 7.32 GiB–8.06 GiB |
| GGUF Q6_K (Unsloth) | 3.49 GiB–3.93 GiB | 4.33 GiB–4.84 GiB | 7.70 GiB–8.46 GiB |
| GGUF Q8_0 (Unsloth) | 4.39 GiB–4.85 GiB | 5.24 GiB–5.77 GiB | 8.61 GiB–9.38 GiB |
| INT4 theoretical Theoretical rows are not downloadable artifacts. | 2.28 GiB–3.32 GiB | 3.12 GiB–4.37 GiB | 6.50 GiB–8.52 GiB |
Raw KV contribution
Standard GQA/MHA raw KV is 2 × layers × kvHeads × headDim × tokens × sequences × bytes per element. This page uses KV heads (8), not query heads (32). Using query heads would overstate this cache by 4×.
- 8,192 tokens, 1 sequence, FP16: 1,207,959,552 bytes (1.1250 GiB)
- 32,768 tokens: 4,831,838,208 bytes (4.5000 GiB)
Related pages
Sources
- Qwen3-4B-Instruct-2507 model card
- config.json — revision cdbee75f17c01a7cc42f958dc650907174af0554
- safetensors index — metadata.total_size=8045591552
- Artifact repo unsloth/Qwen3-4B-Instruct-2507-GGUF
Assumptions that affect this result
- Requested context is within the recorded native window of 262144 tokens.
- 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-Instruct-2507-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.
Calculator
Loading catalog snapshot…
Search or pick a catalog checkpoint to see memory demand.