GLM 4.7

358.3B total, 39.2B active · 198k context · MIT · released 2025-12-22

chatcodingagenticreasoning

In short

GLM 4.7 is an open model from Z.ai with 358.3B parameters (39.2B active per token). At mlx-4bit, GLM 4.7 needs about 189 GB of memory at 8k context and 232 GB at 128k, counting the weights, the KV cache and runtime buffers. Nothing we price in Germany runs GLM 4.7 fully in memory at 128k context at a usable speed; see the table for what comes closest.

Updated . Speeds are estimates; how they are worked out.

What to run it on in Germany

Fully in memory at 128k context, priced at retailers today.

Something we price holds it fully in memory, but none reaches 15 tok/s, our bar for recommending it. The table below has the speeds.

All hardware that runs it

Everything we price, best value first. Two cards split the model by layers.

HardwareQuantFitsDecodePricetok/s per 1,000
Mac Studio M3 Ultra 512GBQ6_Kfits4 tok/s18.995 €0.2

39 other cards and machines we price cannot hold it at this context.

Memory needed

Weights, KV cache and runtime buffers at each context length (KV cache at fp16).

QuantFile@8k@32k@64k@128k
mlx-4bitmlx184.9 GB188.5 GB197.3 GB209.0 GB232.4 GB
Q4_K_Mgguf201.6 GB205.2 GB214.0 GB225.7 GB249.0 GB
Q5_K_Mgguf236.8 GB240.4 GB249.2 GB260.9 GB284.2 GB
mlx-6bitmlx267.0 GB270.7 GB279.4 GB291.1 GB314.5 GB
Q6_Kgguf274.2 GB277.8 GB286.5 GB298.2 GB321.6 GB
mlx-8bitmlx349.2 GB352.8 GB361.6 GB373.2 GB396.6 GB
Q8_0gguf354.8 GB358.4 GB367.2 GB378.9 GB402.3 GB

Run it

Copy a command for the runtime you use.

  • mlx-4bit
    • LM Studiolms get mlx-community/GLM-4.7-4bit
    • MLXmlx_lm.server --model mlx-community/GLM-4.7-4bit
  • Q4_K_M
    • Ollamaollama run hf.co/unsloth/GLM-4.7-GGUF:Q4_K_M
    • LM Studiolms get unsloth/GLM-4.7-GGUF@q4_k_m
    • llama.cppllama-server -hf unsloth/GLM-4.7-GGUF:Q4_K_M
  • Q5_K_M
    • Ollamaollama run hf.co/unsloth/GLM-4.7-GGUF:Q5_K_M
    • LM Studiolms get unsloth/GLM-4.7-GGUF@q5_k_m
    • llama.cppllama-server -hf unsloth/GLM-4.7-GGUF:Q5_K_M
  • mlx-6bit
    • LM Studiolms get mlx-community/GLM-4.7-6bit
    • MLXmlx_lm.server --model mlx-community/GLM-4.7-6bit
  • Q6_K
    • Ollamaollama run hf.co/unsloth/GLM-4.7-GGUF:Q6_K
    • LM Studiolms get unsloth/GLM-4.7-GGUF@q6_k
    • llama.cppllama-server -hf unsloth/GLM-4.7-GGUF:Q6_K
  • mlx-8bit
    • LM Studiolms get mlx-community/GLM-4.7-8bit
    • MLXmlx_lm.server --model mlx-community/GLM-4.7-8bit
  • Q8_0
    • Ollamaollama run hf.co/unsloth/GLM-4.7-GGUF:Q8_0
    • LM Studiolms get unsloth/GLM-4.7-GGUF@q8_0
    • llama.cppllama-server -hf unsloth/GLM-4.7-GGUF:Q8_0

Notes

vLLM and SGLang support GLM-4.7 only on their main branches (nightly/dev images); transformers 4.57.3 is referenced. Example FP8 serving uses tensor parallel 4 (vLLM) or 8 (SGLang).

Questions

How much VRAM does GLM 4.7 need?
At mlx-4bit, GLM 4.7 needs about 189 GB of memory at 8k context and 232 GB at 128k, counting the weights, the KV cache and runtime buffers.
Can I run GLM 4.7 on a 16 GB GPU?
No: it does not fit in 16 GB at 128k context, even with system RAM.
Can I run GLM 4.7 on a 24 GB GPU?
No: it does not fit in 24 GB at 128k context, even with system RAM.
How do I run GLM 4.7 locally?
With Ollama: ollama run hf.co/unsloth/GLM-4.7-GGUF:Q4_K_M (the Q4_K_M build). LM Studio and llama.cpp commands are on this page.
What licence is GLM 4.7 released under?
MIT, which allows commercial use.