Qwen2.5-Coder-7B VRAM & Memory Requirements
Specific checkpoints with sourced architecture and weight files. GGUF Q4_K_M (mradermacher): 4.92 GiB–5.42 GiB at 8,192 tokens, 1 sequence, FP16 KV, llama.cpp.
This result is an estimate, not a measured trace.Not verifiedFile-backed weights
Publisher and provenance
- PublisherQwen
- Hugging Face
Qwen/Qwen2.5-Coder-7B - Revision
0396a76181e127dfc13e5c5ec48a8cee09938b02 - Total parameters7,615,616,512
- Layers28
- Query heads28
- KV heads4 (gqa)
- Head dimension128
- Recorded context capability32,768
- 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
- 4.36 GiB (4,683,074,400 bytes)
- Raw KV cache
- 0.44 GiB (469,762,048 bytes)
- Engine extras / workspace
- 0.13 GiB–0.62 GiB
- Total estimated demand
- 4.92 GiB–5.42 GiB
Published artifacts
| Quantization | Selected files | Bytes | Engine | Evidence |
|---|---|---|---|---|
| BF16 safetensors bf16 | model-00001-of-00004.safetensors, model-00002-of-00004.safetensors, model-00003-of-00004.safetensors, model-00004-of-00004.safetensors | 15,231,233,024 (14.19 GiB / 15.23 GB) | vllm, sglang, unspecified | file-metadata |
| GGUF Q4_K_M (mradermacher) gguf-q4_k_m | Qwen2.5-Coder-7B.Q4_K_M.gguf | 4,683,074,400 (4.36 GiB / 4.68 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q5_K_M (mradermacher) gguf-q5_k_m | Qwen2.5-Coder-7B.Q5_K_M.gguf | 5,444,832,096 (5.07 GiB / 5.44 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q6_K (mradermacher) gguf-q6_k | Qwen2.5-Coder-7B.Q6_K.gguf | 6,254,199,648 (5.82 GiB / 6.25 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q8_0 (mradermacher) gguf-q8_0 | Qwen2.5-Coder-7B.Q8_0.gguf | 8,098,526,048 (7.54 GiB / 8.10 GB) | llama.cpp, ollama, unspecified | file-metadata |
| INT4 theoretical | No published file | 3,807,808,256 (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 | 14.92 GiB–16.80 GiB | 15.25 GiB–17.14 GiB | 16.56 GiB–18.49 GiB |
| GGUF Q4_K_M (mradermacher) | 4.60 GiB–5.06 GiB | 4.92 GiB–5.42 GiB | 6.24 GiB–6.82 GiB |
| GGUF Q5_K_M (mradermacher) | 5.31 GiB–5.78 GiB | 5.63 GiB–6.14 GiB | 6.95 GiB–7.54 GiB |
| GGUF Q6_K (mradermacher) | 6.06 GiB–6.55 GiB | 6.39 GiB–6.91 GiB | 7.70 GiB–8.31 GiB |
| GGUF Q8_0 (mradermacher) | 7.78 GiB–8.30 GiB | 8.10 GiB–8.66 GiB | 9.42 GiB–10.07 GiB |
| INT4 theoretical Theoretical rows are not downloadable artifacts. | 3.78 GiB–5.27 GiB | 4.11 GiB–5.68 GiB | 5.42 GiB–7.30 GiB |
Raw KV contribution
Standard GQA/MHA raw KV is 2 × layers × kvHeads × headDim × tokens × sequences × bytes per element. This page uses KV heads (4), not query heads (28). Using query heads would overstate this cache by 7×.
- 8,192 tokens, 1 sequence, FP16: 469,762,048 bytes (0.4375 GiB)
- 32,768 tokens: 1,879,048,192 bytes (1.7500 GiB)
Related pages
Sources
- Qwen2.5-Coder-7B model card
- config.json — revision 0396a76181e127dfc13e5c5ec48a8cee09938b02
- safetensors index — metadata.total_size=15231233024
- Artifact repo mradermacher/Qwen2.5-Coder-7B-GGUF
Assumptions that affect this result
- Requested context is within the recorded native window of 32768 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: Qwen2.5-Coder-7B.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.
Search or pick a catalog checkpoint to see memory demand.