GLM-4.7-Flash · GGUF (llama.cpp)
GGUF quantizations of zai-org/GLM-4.7-Flash 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).
Revision 2026-11-02: the
Q3_K_MandQ2_Kfiles were removed from this repo:Q3_K_Mbecause its perplexity check gave a result that could not be explained,Q2_Kbecause it failed the chat check (it never answered the Korean question in Korean, only repeating English commentary until the 256-token limit). The other files are unchanged.
Files
| File | Size | Notes |
|---|---|---|
GLM-4.7-Flash-Q4_K_M.gguf |
18.9 GB | 4-bit k-quant (medium) — recommended size/quality balance. |
GLM-4.7-Flash-Q5_K_M.gguf |
22.2 GB | 5-bit k-quant (medium) — high quality. |
GLM-4.7-Flash-Q6_K.gguf |
25.7 GB | 6-bit k-quant — high quality, larger. |
GLM-4.7-Flash-Q8_0.gguf |
33.2 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.
Requirements
| llama.cpp | build ≥ b10251 — architecture deepseek2 + MTP layer needs ≥ b10251, 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 and two short chat questions (capital of France / of Korea) were answered correctly with every file. Perplexity was measured too but is not published: a Q3_K_M file, since removed from this repo, scored far below Q8_0 on WikiText-2 (with both 16 and 64 windows) for a reason that was not found, so the perplexity measurement is not used for this model. |
| 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.7-Flash-GGUF:Q4_K_M -c 8192 --jinja
# or download a single file and chat in the terminal
hf download axteam/GLM-4.7-Flash-GGUF GLM-4.7-Flash-Q4_K_M.gguf --local-dir .
llama-cli -m GLM-4.7-Flash-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": "대한민국의 수도는 어디인가요?"}],
"temperature": 1.0, "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.7-Flash-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.7-Flash-GGUF:Q4_K_M
LM Studio
Search for axteam/GLM-4.7-Flash-GGUF in the model browser and pick a quant (e.g. Q4_K_M).
Recommended sampling (from the original
generation_config.json):temperature=1.0.
License
Quantized derivative of zai-org/GLM-4.7-Flash (MIT). Original weights & tokenizer belong to Z.ai / zai-org.
한국어 요약
zai-org/GLM-4.7-Flash의 GGUF 양자화 빌드 (llama.cpp·Ollama·LM Studio용) · 제작 axteam
개요
| 항목 | 내용 |
|---|---|
| 원본 모델 | zai-org/GLM-4.7-Flash |
| 형식 | GGUF (llama.cpp) |
| 변환 도구 | llama.cpp convert_hf_to_gguf.py → llama-quantize |
| 파일 수 | 4개 |
양자화 상세
- 양자화 절차: PTQ(학습 후 양자화, 재학습 없음), llama.cpp 블록 단위 양자화(k-quant
Q*_K,Q8_0) - chat template: GGUF 파일에 내장
- 품질: PPL을 쟀으나 싣지 않음 — 이후 이 리포에서 삭제한
Q3_K_M파일이 원인을 찾지 못한 채Q8_0보다 크게 낮게 나와 이 모델의 PPL 측정은 쓰지 않음 - 수정 이력 (2026-11-02):
Q3_K_M·Q2_K파일 삭제 —Q3_K_M은 PPL 점검 결과를 설명할 수 없었고,Q2_K는 질문 점검에서 한국어 질문에 한국어로 답하지 못하고 영어 설명문만 256토큰 한도까지 되풀이함, 나머지 파일은 그대로
제공 파일
| 파일 | 크기 | 설명 |
|---|---|---|
GLM-4.7-Flash-Q4_K_M.gguf |
18.9 GB | 4비트 k-quant — 크기·품질 균형 (권장) |
GLM-4.7-Flash-Q5_K_M.gguf |
22.2 GB | 5비트 k-quant — 고품질 |
GLM-4.7-Flash-Q6_K.gguf |
25.7 GB | 6비트 k-quant — 고품질, 용량 큼 |
GLM-4.7-Flash-Q8_0.gguf |
33.2 GB | 8비트 — 원본에 가장 가까움 |
요구사항
- llama.cpp: b10251 이상 (
deepseek2구조 + MTP 층 지원 b10251부터, 예시 명령의-fa on옵션 b6325부터) - 실행 확인: 2026-11-02 b12005(커밋 e0f142d) CUDA 빌드로 NVIDIA B200에서 이 리포의 모든 파일을 전 층 GPU에 올려 실행 — 모든 파일에서 짧은 질문 2개(프랑스·대한민국 수도)에 바르게 답함, PPL도 쟀으나 싣지 않음(이후 이 리포에서 삭제한
Q3_K_M파일이 원인을 찾지 못한 채 영어 텍스트에서 16·64청크 모두Q8_0보다 크게 낮게 나와 이 모델의 PPL 측정은 쓰지 않음) - 메모리: 선택한 GGUF 파일 크기 + 컨텍스트(
-c)만큼의 KV 캐시 (KV 캐시 줄이는 방법은 아래 사용법 참고) - 입력: 텍스트
- Ollama·LM Studio: 제작 측에서 실행 미확인
사용법
- 파일 받기:
hf download axteam/GLM-4.7-Flash-GGUF GLM-4.7-Flash-Q4_K_M.gguf --local-dir .(아래-m명령에 필요, 다른 양자화는 파일명의Q4_K_M만 변경) - 서버 실행:
llama-server -hf axteam/GLM-4.7-Flash-GGUF:Q4_K_M -c 8192 --jinja— OpenAI 호환 API - 터미널 대화:
llama-cli -m GLM-4.7-Flash-Q4_K_M.gguf -c 8192 --jinja - Ollama:
ollama run hf.co/axteam/GLM-4.7-Flash-GGUF:Q4_K_M - LM Studio: 모델 검색에서
axteam/GLM-4.7-Flash-GGUF입력 후 양자화 단계 선택 - KV 캐시 절감(선택):
--cache-type-k q8_0 --cache-type-v q8_0 -fa on— KV 캐시 약 절반, GGUF 파일과 상관없이 실행 시 지정 - 권장 샘플링:
temperature=1.0(원본generation_config.json기준)
라이선스
- 라이선스: MIT — 원본 모델의 라이선스를 그대로 따름
- 권리: 원본 가중치·토크나이저는 Z.ai 소유, 이 리포는 양자화 파생물