GLM-4-9B-0414 VRAM & Memory Requirements
Specific checkpoints with sourced architecture and weight files. GGUF Q4_K_M (Unsloth): 6.18 GiB–6.69 GiB at 8,192 tokens, 1 sequence, FP16 KV, llama.cpp.
This result is an estimate, not a measured trace.Not verifiedFile-backed weights
Runs on
Publisher and provenance
- PublisherZhipu AI
- Hugging Face
zai-org/GLM-4-9B-0414 - Revision
645b8482494e31b6b752272bf7f7f273ef0f3caf - Total parameters9,400,279,040
- Layers40
- Query heads32
- KV heads2 (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
- 5.74 GiB (6,166,574,944 bytes)
- Raw KV cache
- 0.31 GiB (335,544,320 bytes)
- Engine extras / workspace
- 0.13 GiB–0.64 GiB
- Total estimated demand
- 6.18 GiB–6.69 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 | 18,800,558,080 (17.51 GiB / 18.80 GB) | vllm, sglang, unspecified | file-metadata |
| GGUF Q4_K_M (Unsloth) gguf-q4_k_m | GLM-4-9B-0414-Q4_K_M.gguf | 6,166,574,944 (5.74 GiB / 6.17 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q5_K_M (Unsloth) gguf-q5_k_m | GLM-4-9B-0414-Q5_K_M.gguf | 7,050,917,728 (6.57 GiB / 7.05 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q6_K (Unsloth) gguf-q6_k | GLM-4-9B-0414-Q6_K.gguf | 8,266,643,296 (7.70 GiB / 8.27 GB) | llama.cpp, ollama, unspecified | file-metadata |
| GGUF Q8_0 (Unsloth) gguf-q8_0 | GLM-4-9B-0414-Q8_0.gguf | 9,999,611,744 (9.31 GiB / 10.00 GB) | llama.cpp, ollama, unspecified | file-metadata |
| INT4 theoretical | No published file | 4,700,139,520 (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 | 18.21 GiB–20.09 GiB | 18.45 GiB–20.33 GiB | 19.38 GiB–21.30 GiB |
| GGUF Q4_K_M (Unsloth) | 5.95 GiB–6.44 GiB | 6.18 GiB–6.69 GiB | 7.12 GiB–7.70 GiB |
| GGUF Q5_K_M (Unsloth) | 6.77 GiB–7.28 GiB | 7.00 GiB–7.53 GiB | 7.94 GiB–8.54 GiB |
| GGUF Q6_K (Unsloth) | 7.90 GiB–8.43 GiB | 8.14 GiB–8.69 GiB | 9.07 GiB–9.69 GiB |
| GGUF Q8_0 (Unsloth) | 9.52 GiB–10.08 GiB | 9.75 GiB–10.33 GiB | 10.69 GiB–11.34 GiB |
| INT4 theoretical Theoretical rows are not downloadable artifacts. | 4.58 GiB–6.30 GiB | 4.81 GiB–6.60 GiB | 5.75 GiB–7.75 GiB |
Raw KV contribution
Standard GQA/MHA raw KV is 2 × layers × kvHeads × headDim × tokens × sequences × bytes per element. This page uses KV heads (2), not query heads (32). Using query heads would overstate this cache by 16×.
- 8,192 tokens, 1 sequence, FP16: 335,544,320 bytes (0.3125 GiB)
- 32,768 tokens: 1,342,177,280 bytes (1.2500 GiB)
Related pages
Sources
- GLM-4-9B-0414 model card
- config.json — revision 645b8482494e31b6b752272bf7f7f273ef0f3caf
- safetensors index — metadata.total_size=18800558080
- Artifact repo unsloth/GLM-4-9B-0414-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: GLM-4-9B-0414-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.