GLM-4-9B-0414 ยท GGUF (llama.cpp)
GGUF quantizations of zai-org/GLM-4-9B-0414 for llama.cpp / Ollama / LM Studio. Produced by axteam, converted with the official llama.cpp convert_hf_to_gguf.py (the original chat_template is embedded).
Files
| File | Size | Notes |
|---|---|---|
GLM-4-9B-0414-Q2_K.gguf |
4.0 GB | 2-bit k-quant โ smallest, noticeable quality loss (for tight memory). |
GLM-4-9B-0414-Q3_K_M.gguf |
5.0 GB | 3-bit k-quant (medium) โ small, some quality loss. |
GLM-4-9B-0414-Q4_K_M.gguf |
6.2 GB | 4-bit k-quant (medium) โ recommended size/quality balance. |
GLM-4-9B-0414-Q5_K_M.gguf |
7.1 GB | 5-bit k-quant (medium) โ high quality. |
GLM-4-9B-0414-Q6_K.gguf |
8.3 GB | 6-bit k-quant โ high quality, larger. |
GLM-4-9B-0414-Q8_0.gguf |
10.0 GB | 8-bit โ closest to the original. |
Quantization method
These GGUF files are post-training quantization (PTQ) made with llama.cpp (convert_hf_to_gguf.py โ llama-quantize): the BF16 weights are quantized block-wise (k-quants: per-block scales with mixed bit allocation), with no retraining. The original chat_template is embedded in each file.
Measured on GPU (llama.cpp)
llama.cpp b12005 (commit e0f142d, CUDA build) on an NVIDIA B200, 2026-11-02, all layers on the GPU: perplexity over 16 windows of 2,048 tokens from the WikiText-2 test set and from a Korean Wikipedia sample (lower is better). This repo has no BF16 file, so percentages are relative to Q8_0, the file closest to the original.
| File | WikiText-2 PPL | Korean wiki PPL | vs Q8_0 (EN / KO) |
|---|---|---|---|
GLM-4-9B-0414-Q8_0.gguf |
8.10 | 4.84 | reference |
GLM-4-9B-0414-Q6_K.gguf |
8.12 | 4.85 | +0.3% / +0.1% |
GLM-4-9B-0414-Q5_K_M.gguf |
8.13 | 4.88 | +0.4% / +0.7% |
GLM-4-9B-0414-Q4_K_M.gguf |
8.22 | 4.93 | +1.4% / +1.8% |
GLM-4-9B-0414-Q3_K_M.gguf |
8.61 | 5.13 | +6.3% / +6.0% |
GLM-4-9B-0414-Q2_K.gguf |
10.25 | 6.27 | +26.5% / +29.5% |
16 windows per text is a small sample: differences of a few percent between files are within its sampling noise (re-measuring two repos with 64 windows moved such differences by up to ~19 points).
Requirements
| llama.cpp | build โฅ b6325 โ architecture glm4 needs โฅ b5115, and the commands on this card use -fa on (โฅ b6325). Run here on 2026-11-02 with b12005 (commit e0f142d, CUDA build) on an NVIDIA B200: every file in this repo loaded with all layers on the GPU, its perplexity was measured (see Measured on GPU above) and two short chat questions (capital of France / of Korea) were answered correctly with every file. |
| Memory | the chosen GGUF file (sizes in the table) plus KV cache for the context (-c); --cache-type-k/v q8_0 -fa on halves the KV cache. |
| Input | text. |
| Ollama / LM Studio | not tested here. |
Run with llama.cpp
# pull one quant straight from the Hub and serve an OpenAI-compatible API on :8080
llama-server -hf axteam/GLM-4-9B-0414-GGUF:Q4_K_M -c 8192 --jinja
# or download a single file and chat in the terminal
hf download axteam/GLM-4-9B-0414-GGUF GLM-4-9B-0414-Q4_K_M.gguf --local-dir .
llama-cli -m GLM-4-9B-0414-Q4_K_M.gguf -c 8192 --jinja
Query the server:
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "๋ํ๋ฏผ๊ตญ์ ์๋๋ ์ด๋์ธ๊ฐ์?"}],
"max_tokens": 512
}'
Reduce KV-cache memory (optional, run-time)
KV-cache type is chosen at run time in llama.cpp (it is not baked into the file):
llama-server -hf axteam/GLM-4-9B-0414-GGUF:Q4_K_M -c 8192 --jinja --cache-type-k q8_0 --cache-type-v q8_0 -fa on
Ollama
ollama run hf.co/axteam/GLM-4-9B-0414-GGUF:Q4_K_M
LM Studio
Search for axteam/GLM-4-9B-0414-GGUF in the model browser and pick a quant (e.g. Q4_K_M).
License
Quantized derivative of zai-org/GLM-4-9B-0414 (MIT). Original weights & tokenizer belong to Z.ai / zai-org.
ํ๊ตญ์ด ์์ฝ
zai-org/GLM-4-9B-0414์ GGUF ์์ํ ๋น๋ (llama.cppยทOllamaยทLM Studio์ฉ) ยท ์ ์ axteam
๊ฐ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ณธ ๋ชจ๋ธ | zai-org/GLM-4-9B-0414 |
| ํ์ | GGUF (llama.cpp) |
| ๋ณํ ๋๊ตฌ | llama.cpp convert_hf_to_gguf.py โ llama-quantize |
| ํ์ผ ์ | 6๊ฐ |
์์ํ ์์ธ
- ์์ํ ์ ์ฐจ: PTQ(ํ์ต ํ ์์ํ, ์ฌํ์ต ์์), llama.cpp ๋ธ๋ก ๋จ์ ์์ํ(k-quant
Q*_K,Q8_0) - chat template: GGUF ํ์ผ์ ๋ด์ฅ
- ํ์ง(์ค์ธก, 2026-11-02): llama.cpp PPL(WikiText-2ยทํ๊ตญ์ด ์ํค ํ๋ณธ, 2,048ํ ํฐร16, B200 GPU, ๋ฎ์์๋ก ์ข์, ๋ฆฌํฌ์ BF16 ํ์ผ์ด ์์ด ์๋ณธ์ ๊ฐ์ฅ ๊ฐ๊น์ด Q8_0 ๊ธฐ์ค) โ
GLM-4-9B-0414-Q8_0.gguf์์ด 8.10ยทํ๊ตญ์ด 4.84 ยทGLM-4-9B-0414-Q6_K.gguf์์ด 8.12ยทํ๊ตญ์ด 4.85(Q8_0 ๋๋น +0.3%ยท+0.1%) ยทGLM-4-9B-0414-Q5_K_M.gguf์์ด 8.13ยทํ๊ตญ์ด 4.88(Q8_0 ๋๋น +0.4%ยท+0.7%) ยทGLM-4-9B-0414-Q4_K_M.gguf์์ด 8.22ยทํ๊ตญ์ด 4.93(Q8_0 ๋๋น +1.4%ยท+1.8%) ยทGLM-4-9B-0414-Q3_K_M.gguf์์ด 8.61ยทํ๊ตญ์ด 5.13(Q8_0 ๋๋น +6.3%ยท+6.0%) ยทGLM-4-9B-0414-Q2_K.gguf์์ด 10.25ยทํ๊ตญ์ด 6.27(Q8_0 ๋๋น +26.5%ยท+29.5%) โ ํ ์คํธ๋น 16์ฒญํฌ๋ผ ํ์ผ ์ฌ์ด ๋ช % ์ฐจ์ด๋ ํ๋ณธ ํ๋ค๋ฆผ ๋ฒ์
์ ๊ณต ํ์ผ
| ํ์ผ | ํฌ๊ธฐ | ์ค๋ช |
|---|---|---|
GLM-4-9B-0414-Q2_K.gguf |
4.0 GB | 2๋นํธ k-quant โ ๊ฐ์ฅ ์์, ํ์ง ์ ํ ํผ (๋ฉ๋ชจ๋ฆฌ๊ฐ ๋ถ์กฑํ ๋) |
GLM-4-9B-0414-Q3_K_M.gguf |
5.0 GB | 3๋นํธ k-quant โ ์์, ํ์ง ๋ค์ ์ ํ |
GLM-4-9B-0414-Q4_K_M.gguf |
6.2 GB | 4๋นํธ k-quant โ ํฌ๊ธฐยทํ์ง ๊ท ํ (๊ถ์ฅ) |
GLM-4-9B-0414-Q5_K_M.gguf |
7.1 GB | 5๋นํธ k-quant โ ๊ณ ํ์ง |
GLM-4-9B-0414-Q6_K.gguf |
8.3 GB | 6๋นํธ k-quant โ ๊ณ ํ์ง, ์ฉ๋ ํผ |
GLM-4-9B-0414-Q8_0.gguf |
10.0 GB | 8๋นํธ โ ์๋ณธ์ ๊ฐ์ฅ ๊ฐ๊น์ |
์๊ตฌ์ฌํญ
- llama.cpp: b6325 ์ด์ (
glm4๊ตฌ์กฐ ์ง์ b5115๋ถํฐ, ์์ ๋ช ๋ น์-fa on์ต์ b6325๋ถํฐ) - ์คํ ํ์ธ: 2026-11-02 b12005(์ปค๋ฐ e0f142d) CUDA ๋น๋๋ก NVIDIA B200์์ ์ด ๋ฆฌํฌ์ ๋ชจ๋ ํ์ผ์ ์ ์ธต GPU์ ์ฌ๋ ค ์คํ โ PPL ์ธก์ (์ ์์ด ๋ณธ๋ฌธ ํ), ๋ชจ๋ ํ์ผ์์ ์งง์ ์ง๋ฌธ 2๊ฐ(ํ๋์คยท๋ํ๋ฏผ๊ตญ ์๋)์ ๋ฐ๋ฅด๊ฒ ๋ตํจ
- ๋ฉ๋ชจ๋ฆฌ: ์ ํํ GGUF ํ์ผ ํฌ๊ธฐ + ์ปจํ
์คํธ(
-c)๋งํผ์ KV ์บ์ (KV ์บ์ ์ค์ด๋ ๋ฐฉ๋ฒ์ ์๋ ์ฌ์ฉ๋ฒ ์ฐธ๊ณ ) - ์ ๋ ฅ: ํ ์คํธ
- OllamaยทLM Studio: ์ ์ ์ธก์์ ์คํ ๋ฏธํ์ธ
์ฌ์ฉ๋ฒ
- ํ์ผ ๋ฐ๊ธฐ:
hf download axteam/GLM-4-9B-0414-GGUF GLM-4-9B-0414-Q4_K_M.gguf --local-dir .(์๋-m๋ช ๋ น์ ํ์, ๋ค๋ฅธ ์์ํ๋ ํ์ผ๋ช ์Q4_K_M๋ง ๋ณ๊ฒฝ) - ์๋ฒ ์คํ:
llama-server -hf axteam/GLM-4-9B-0414-GGUF:Q4_K_M -c 8192 --jinjaโ OpenAI ํธํ API - ํฐ๋ฏธ๋ ๋ํ:
llama-cli -m GLM-4-9B-0414-Q4_K_M.gguf -c 8192 --jinja - Ollama:
ollama run hf.co/axteam/GLM-4-9B-0414-GGUF:Q4_K_M - LM Studio: ๋ชจ๋ธ ๊ฒ์์์
axteam/GLM-4-9B-0414-GGUF์ ๋ ฅ ํ ์์ํ ๋จ๊ณ ์ ํ - KV ์บ์ ์ ๊ฐ(์ ํ):
--cache-type-k q8_0 --cache-type-v q8_0 -fa onโ KV ์บ์ ์ฝ ์ ๋ฐ, GGUF ํ์ผ๊ณผ ์๊ด์์ด ์คํ ์ ์ง์
๋ผ์ด์ ์ค
- ๋ผ์ด์ ์ค: MIT โ ์๋ณธ ๋ชจ๋ธ์ ๋ผ์ด์ ์ค๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฆ
- ๊ถ๋ฆฌ: ์๋ณธ ๊ฐ์ค์นยทํ ํฌ๋์ด์ ๋ Z.ai ์์ , ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ