GLM 5

742.1B total, 40B active · 198k context · MIT · released 2026-02-11

chatcodingagenticreasoning

In short

GLM 5 is an open model from Z.ai with 742.1B parameters (40B active per token). At MXFP4, GLM 5 needs about 384 GB of memory at 8k context and 384 GB at 8k, counting the weights, the KV cache and runtime buffers. Nothing we price in the US runs GLM 5 fully in memory at 8k 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 the US

Fully in memory at 8k 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 512GBMXFP4fits14 tok/s$25,0000.6

40 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
MXFP4gguf382.4 GB383.8 GB386.0 GB388.9 GB394.8 GB
mlx-4bitmlx389.9 GB391.3 GB393.5 GB396.4 GB402.3 GB
Q4_K_Mgguf424.6 GB426.0 GB428.2 GB431.1 GB437.0 GB
Q5_K_Mgguf498.4 GB499.8 GB502.0 GB505.0 GB510.8 GB
Q6_Kgguf576.8 GB578.3 GB580.5 GB583.4 GB589.3 GB
Q8_0gguf746.3 GB747.7 GB749.9 GB752.9 GB758.7 GB

Run it

Copy a command for the runtime you use.

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

Notes

Local serving needs recent frameworks (vLLM v0.19.0+, SGLang v0.5.10+); examples use tensor-parallel size 8. Uses DeepSeek Sparse Attention. Sparse or compressed attention: KV read per token is estimated as full attention. Excludes 11.8B parameters of multi-token-prediction layers, which local runtimes do not load.

Questions

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