GLM-5.3 Local Deployment: Architecture, Runtimes And The 1M Context Reality
Published · 7 min read
GLM-5.3 is a 744B parameter MoE with 40B active weights, 78 layers, 256 routed experts plus one shared expert, and a 1,048,576 token context window. FP8 weights take about 756 GB and BF16 about 1.5 TB, so full precision needs an 8-GPU class server. GGUF builds start at 223 GB of total memory at 1-bit. vLLM and SGLang cover native weights, llama.cpp and Unsloth cover quantized runs, and Ascend has vLLM-Ascend and xLLM.
In this article
What is inside GLM-5.3?
The published config describes GlmMoeDsaForCausalLM. The first three layers are dense and the remaining 75 are sparse MoE layers. Each token routes to 8 of the 256 routed experts, with one shared expert always active. Attention is DeepSeek Sparse Attention with a shared indexer, plus one multi-token prediction layer. The vocabulary has 154,880 entries and the position count is 1,048,576 with no position scaling.
| Field | Published value | Serving implication |
|---|---|---|
| Total / active parameters | 744B / 40B | MoE, 8 routed experts per token |
| Layers | 78 | 3 dense, 75 MoE |
| Experts | 256 routed + 1 shared | Shared expert runs on every token |
| Attention | DeepSeek Sparse Attention | Shared indexer, one MTP layer |
| Vocabulary | 154,880 | Text in, text out |
| Positions | 1,048,576 | No position scaling in config |
| Weight files | 141 FP8 shards, 282 BF16 shards | About 756 GB / 1.5 TB on disk |
GLM-5.3 and GLM-5.2 share the same base model. Every gain in 5.3 comes from post-training, so a serving recipe written for 5.2 mostly carries over. The license keeps the notice requirement and adds one condition: a licensee whose group runs a model-as-a-service business with more than US$10 billion of revenue in any 12 months needs Z.ai's security review before commercial use. Most teams never cross that line.
Which serving stack fits your machine?
The model card links recipes for vLLM and SGLang, and lists TokenSpeed, Transformers, KTransformers and Unsloth. Model code landed in vLLM 0.28.0, SGLang 0.5.22, Transformers 5.12.0 and mlx-lm 0.32.2. llama.cpp implements the glm-dsa architecture and consumes the dynamic GGUF builds. Ollama only has a cloud entry, so it is not a local serving path.
For an 8-GPU node, vLLM is the shortest route to an OpenAI-compatible endpoint:
vllm serve zai-org/GLM-5.3 --tensor-parallel-size 8 --kv-cache-dtype fp8 \
--tool-call-parser glm47 --reasoning-parser glm47 --enable-auto-tool-choice
SGLang suits agent workflows that lean on tool calls, and it has an Ascend branch. For a single machine without server GPUs, use the Unsloth GGUF build through llama.cpp or Unsloth Desktop. Unsloth also fixed a chat template detail: GLM used a .{id}. notation that several engines rejected, and the published template now uses [id] list index syntax.
How much memory does each quantization need?
The native weights set the floor. FP8 is about 756 GB and fits an 8 by H200 node at 1,128 GB with room for KV cache. Eight H100 cards give 640 GB and cannot hold those weights. The BF16 repository is about 1.5 TB, and the smaller GLM-5.3-Flash FP8 build is about 328 GB.
Dynamic GGUF builds change the picture. The published total memory figures count RAM plus VRAM, or unified memory:
| Quantization | Total memory | Note |
|---|---|---|
| 1-bit | 223 GB | About 72.6% top-1, largest accuracy loss |
| 2-bit | 245 GB | UD-IQ2_M is 239 GB on disk, 78.5% top-1 |
| 3-bit | 290-360 GB | Depends on the exact GGUF method |
| 4-bit | 372-475 GB | Q4_K_XL reports 94.3% top-1 |
| 6-bit | 570 GB | Close to baseline accuracy |
| 8-bit | 810 GB | Near full precision |
A 256 GB Mac Studio or a dual DGX Spark can run the 2-bit build, but it will offload heavily and latency will not look like an 8-GPU server. If you want to compare behaviour before buying hardware, our pricing page shows the current options.
What does 1M context actually require?
config.json sets max_position_embeddings to 1,048,576. You need the memory and a runtime that handles DSA before that number means anything. In llama.cpp, KV cache quantization is the lever that matters. The default is f16. Switching both K and V caches to q4_1 uses about 5 bits per weight and allows roughly 3.2 times longer context at the same memory.
Four settings to work through, in this order:
- Start at 128K tokens and confirm the model loads with headroom. Jumping straight to 1M usually ends in an allocation failure.
- Raise the window in steps. 262K, then 524K, then 1,048,576, watching actual memory as you go.
- Set
--cache-type-k q4_1 --cache-type-v q4_1 --jinjabefore you push the window up. Keep--chat-template-kwargs '{"reasoning_effort":"max"}'for hard coding work. - Use
clear_thinking=trueon multi-turn sessions. GLM-5.3 always reasons and cannot switch thinking off, so old reasoning tokens otherwise pile up in the history.
Reasoning effort accepts low, high and max. For most tasks, temperature 1.0 with top_p 0.95 works; long agent runs use top_p 1.0 and min_p 0.01. The sampling numbers are published defaults, while the step-up order above is a practical recommendation, not a benchmark result.
Which official harnesses say what?
Z.ai publishes 16 benchmarks, with 17 data points because ExploitGym reports both 2-hour and 6-hour runs. These are capability scores, not throughput numbers for your own hardware.
| Harness | GLM-5.3 | GLM-5.2 | What it covers |
|---|---|---|---|
| Terminal Bench 3.0 | 28.3 | 4.6 | Terminal-based coding tasks |
| CyberGym | 84.5 | 77.2 | Vulnerability discovery |
| DeepSWE v1.1 | 66.9 | 46.2 | Repository-level engineering |
| AutomationBench v1.0.6 | 48.2 | 26.2 | Workflow automation |
| Toolathlon Verified | 73.0 | 59.9 | Tool use |
| Agents' Last Exam, ALE-CLI | 28.5 | 23.8 | Long-horizon agent work |
| GDPval-AA v2 | 1769 | 1508 | Work-value evaluation, own scale |
Terminal Bench 3.0 goes from 4.6 to 28.3. AutomationBench goes from 26.2 to 48.2. Both describe what post-training changed, not how fast the model runs. For deployment decisions, run your own token-per-second and time-to-first-token test on your actual quant and context size.
FAQ
Does GLM-5.3 support a 1M context in every runtime?
The model supports 1,048,576 positions. A runtime only reaches that ceiling if it implements the DSA architecture and you have enough memory after KV cache quantization. Check the context flag and the cache type before assuming the full window is active.
Can thinking be disabled?
No. The model always reasons. reasoning_effort accepts low, high or max, and clear_thinking=true removes earlier reasoning from multi-turn history.
Can one consumer GPU run it?
Not the native weights. A 1-bit GGUF needs about 223 GB of total memory. That is workstation or small-server territory with CPU and GPU offload, not a single 24 GB card.
Is commercial use allowed?
Yes under the GLM-5.3 License, with notice retention and lawful use. The revenue threshold for a model-as-a-service security review is US$10 billion over any 12 months for the licensee and its affiliates.
If you would rather test the model than assemble the hardware, start from our pricing page. Local serving is doable, and the cost of a week of experiments usually settles the decision.