Qwen Coder · Q4_K_M · Dense · GGUF v3

Qwen2.5 Coder 32B Instruct (Q4_K_M) — Exact VRAM, KV Cache & Tensor X-Ray

Heavyweight local coding model (~18.5 GiB in Q4_K_M): fits 24 GB GPUs with room for 16k–32k repository context.

⚡ Simulate on Your GPU in Browser (WASM) Benchmark & Sign Ed25519 in Local Cockpit 0.4.0 View File on HuggingFace
Min VRAM (8k · FP16 KV)21.23 GiB32k w/ Q8_0 KV: 23.68 GiB
Binary .GGUF Weights18.48 GiB4.85 effective bits/weight
Parameters (Active / Total)32.76 / 32.76 B771 parsed tensors
KV Cache Growth256.0 MiB/1kQ8_0 KV: 136.0 MiB / 1k tok

1. HuggingFace Binary Provenance

RepositoryQwen/Qwen2.5-Coder-32B-Instruct-GGUF
Inspected Fileqwen2.5-coder-32b-instruct-q4_k_m.gguf (18.49 GiB)
HF Commit SHA9d3053fce650
Harvested UTC2026-11-29 15:28:36 UTC
Parsed Header5 978 294 bytes (SHA-256 8af14628d9ea6fdd47df…)

2. Transformer & GQA Architecture

GGUF Architectureqwen2 (Dense)
Transformer Layers64 layers (~279.7 MiB / layer)
Dimensions (d_model / FFN)5120 / 27648
Attention Heads (Q / KV)40 Q / 8 KV (GQA 5.0:1, dim 128)
Native Context & Vocab131 072 tokens · vocab 152 064

3. Exact GGML Quantization Mix Inside This Binary

Rather than quantizing every tensor identically, Q4_K_M keeps sensitive embedding, output and attention tensors at higher precision:

GGML TypeTensor CountVolumeWeight ShareDistribution
Q4_K38514.29 GiB77.3%
Q6_K654.18 GiB22.6%
F323210.00 GiB0.0%

4. KV-Cache Context Cliff from 2k to 128k Tokens (FP16 vs Q8_0 vs Q4_0)

Enabling Flash Attention with a Q8_0 KV cache cuts context memory nearly in half without altering model weights:

Context Length KV Only (FP16) KV Only (Q8_0) KV Only (Q4_0) Total VRAM (FP16) Total VRAM (Q8_0)
2k (2 048)0.50 GiB0.27 GiB0.14 GiB19.73 GiB19.50 GiB
4k (4 096)1.00 GiB0.53 GiB0.28 GiB20.23 GiB19.76 GiB
8k (8 192)2.00 GiB1.06 GiB0.56 GiB21.23 GiB20.29 GiB
16k (16 384)4.00 GiB2.13 GiB1.13 GiB23.23 GiB21.36 GiB
32k (32 768)8.00 GiB4.25 GiB2.25 GiB27.23 GiB23.48 GiB
64k (65 536)16.00 GiB8.50 GiB4.50 GiB35.23 GiB27.73 GiB
128k (131 072)32.00 GiB17.00 GiB9.00 GiB51.23 GiB36.23 GiB

5. Layer-by-Layer GPU Offload Matrix Across Hardware Tiers

Deterministic memory placement including OS display VRAM reserve and compute buffers:

Hardware Tier Context & KV Layers in VRAM VRAM Used RAM Spillover Memory Verdict
8 GB GPU + 16 GB RAM8k · KV FP1619 / 647.11 GiB13.64 GiBOut of Memory
8 GB GPU + 16 GB RAM32k · KV FP1614 / 647.21 GiB19.80 GiBOut of Memory
8 GB GPU + 16 GB RAM32k · KV Q8_016 / 647.04 GiB16.23 GiBOut of Memory
12 GB GPU + 32 GB RAM8k · KV FP1632 / 6411.01 GiB9.74 GiBRAM Spillover
12 GB GPU + 32 GB RAM32k · KV FP1624 / 6411.12 GiB15.89 GiBRAM Spillover
12 GB GPU + 32 GB RAM32k · KV Q8_028 / 6411.04 GiB12.22 GiBRAM Spillover
16 GB GPU + 32 GB RAM8k · KV FP1645 / 6414.88 GiB5.87 GiBRAM Spillover
16 GB GPU + 32 GB RAM32k · KV FP1634 / 6415.03 GiB11.98 GiBRAM Spillover
16 GB GPU + 32 GB RAM32k · KV Q8_040 / 6415.04 GiB8.22 GiBRAM Spillover
24 GB GPU + 64 GB RAM8k · KV FP1664 / 6420.75 GiB—100% VRAM
24 GB GPU + 64 GB RAM32k · KV FP1653 / 6422.51 GiB4.50 GiBRAM Spillover
24 GB GPU + 64 GB RAM32k · KV Q8_062 / 6422.55 GiB0.71 GiBRAM Spillover
32 GB GPU + 64 GB RAM8k · KV FP1664 / 6420.75 GiB—100% VRAM
32 GB GPU + 64 GB RAM32k · KV FP1664 / 6427.01 GiB—100% VRAM
32 GB GPU + 64 GB RAM32k · KV Q8_064 / 6423.26 GiB—100% VRAM
48 GB Dual-GPU + 128 GB RAM8k · KV FP1664 / 6420.75 GiB—100% VRAM
48 GB Dual-GPU + 128 GB RAM32k · KV FP1664 / 6427.01 GiB—100% VRAM
48 GB Dual-GPU + 128 GB RAM32k · KV Q8_064 / 6423.26 GiB—100% VRAM
64 GB Unified Memory8k · KV FP1664 / 6420.75 GiB—Unified Memory
64 GB Unified Memory32k · KV FP1664 / 6427.01 GiB—Unified Memory
64 GB Unified Memory32k · KV Q8_064 / 6423.26 GiB—Unified Memory

6. Ready-to-Run Local CLI Commands

With Ollama:
ollama run qwen2.5-coder:32b
With llama-server (Flash Attention + Q8_0 KV Cache sized for 16 GB VRAM):
llama-server -m qwen2.5-coder-32b-instruct-q4_k_m.gguf -ngl 40 -c 32768 -fa --cache-type-k q8_0 --cache-type-v q8_0

7. Ed25519 Certified Real Hardware Benchmarks

No certified Ed25519 passport recorded for this exact quantization yet (zero synthetic tok/s are ever invented). Run this model in Local Cockpit 0.4.0 to publish the first signed /b/lc-… passport!

8. Related Quantizations & Comparable Models