Qwen2.5-Coder-7B-Instruct VRAM & Memory Requirements
Specific checkpoints with sourced architecture and weight files. GGUF Q4_K_M (Qwen): 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-Instruct - Revision
c03e6d358207e414f1eca0bb1891e29f1db0e242 - 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,073,664 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 (Qwen) gguf-q4_k_m | qwen2.5-coder-7b-instruct-q4_k_m-00001-of-00002.gguf, qwen2.5-coder-7b-instruct-q4_k_m-00002-of-00002.gguf | 4,683,073,664 (4.36 GiB / 4.68 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q5_K_M (Qwen) gguf-q5_k_m | qwen2.5-coder-7b-instruct-q5_k_m-00001-of-00002.gguf, qwen2.5-coder-7b-instruct-q5_k_m-00002-of-00002.gguf | 5,444,831,360 (5.07 GiB / 5.44 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q6_K (Qwen) gguf-q6_k | qwen2.5-coder-7b-instruct-q6_k-00001-of-00002.gguf, qwen2.5-coder-7b-instruct-q6_k-00002-of-00002.gguf | 6,254,198,912 (5.82 GiB / 6.25 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q8_0 (Qwen) gguf-q8_0 | qwen2.5-coder-7b-instruct-q8_0-00001-of-00003.gguf, qwen2.5-coder-7b-instruct-q8_0-00002-of-00003.gguf, qwen2.5-coder-7b-instruct-q8_0-00003-of-00003.gguf | 8,098,525,440 (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 (Qwen) | 4.60 GiB–5.06 GiB | 4.92 GiB–5.42 GiB | 6.24 GiB–6.82 GiB |
| GGUF Q5_K_M (Qwen) | 5.31 GiB–5.78 GiB | 5.63 GiB–6.14 GiB | 6.95 GiB–7.54 GiB |
| GGUF Q6_K (Qwen) | 6.06 GiB–6.55 GiB | 6.39 GiB–6.91 GiB | 7.70 GiB–8.31 GiB |
| GGUF Q8_0 (Qwen) | 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-Instruct model card
- config.json — revision c03e6d358207e414f1eca0bb1891e29f1db0e242
- safetensors index — metadata.total_size=15231233024
- Artifact repo Qwen/Qwen2.5-Coder-7B-Instruct-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-instruct-q4_k_m-00001-of-00002.gguf, qwen2.5-coder-7b-instruct-q4_k_m-00002-of-00002.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.