SiAPI.ai
Português (BR)

GLM-5.3 Local Deployment: Architecture, Runtimes And The 1M Context Reality

By Cameron Voss

Published · 7 min read

TL;DR

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.

Published model fields and what they change for a local serving setup.
FieldPublished valueServing implication
Total / active parameters744B / 40BMoE, 8 routed experts per token
Layers783 dense, 75 MoE
Experts256 routed + 1 sharedShared expert runs on every token
AttentionDeepSeek Sparse AttentionShared indexer, one MTP layer
Vocabulary154,880Text in, text out
Positions1,048,576No position scaling in config
Weight files141 FP8 shards, 282 BF16 shardsAbout 756 GB / 1.5 TB on disk
Table of GLM-5.3 architecture parameters including 78 layers, 256 routed experts, DeepSeek Sparse Attention and 1,048,576 positions
The shape of the model: 78 layers, 8 active experts per token and a 1M position count.

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.

Compatibility matrix for vLLM, SGLang, llama.cpp, Unsloth, Transformers, KTransformers, vLLM-Ascend, xLLM and Ollama on GLM-5.3
Runtime support at a glance: native weights on one side, GGUF builds on the other.

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.

Bar chart of total memory required for 1-bit, 2-bit, 3-bit, 4-bit, 6-bit and 8-bit GLM-5.3 quantizations from 223 GB to 810 GB
Total memory, not VRAM alone: 223 GB at 1-bit and 810 GB at 8-bit.

Dynamic GGUF builds change the picture. The published total memory figures count RAM plus VRAM, or unified memory:

Total memory in GB, with published top-1 accuracy where available.
QuantizationTotal memoryNote
1-bit223 GBAbout 72.6% top-1, largest accuracy loss
2-bit245 GBUD-IQ2_M is 239 GB on disk, 78.5% top-1
3-bit290-360 GBDepends on the exact GGUF method
4-bit372-475 GBQ4_K_XL reports 94.3% top-1
6-bit570 GBClose to baseline accuracy
8-bit810 GBNear full precision
Animation showing memory headroom shrinking as GLM-5.3 quantization moves from 1-bit to 8-bit
Bit width and headroom: the same model, six very different memory bills.

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.

Chart comparing f16 and q4_1 KV cache context lengths and a four-step order for raising the window to 1M tokens
Cache type first, window second: q4_1 gives about 3.2 times more context at the same memory.

Four settings to work through, in this order:

  1. Start at 128K tokens and confirm the model loads with headroom. Jumping straight to 1M usually ends in an allocation failure.
  2. Raise the window in steps. 262K, then 524K, then 1,048,576, watching actual memory as you go.
  3. Set --cache-type-k q4_1 --cache-type-v q4_1 --jinja before you push the window up. Keep --chat-template-kwargs '{"reasoning_effort":"max"}' for hard coding work.
  4. Use clear_thinking=true on 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.

Bar chart comparing GLM-5.3 and GLM-5.2 on five official evaluation harnesses plus a separate GDPval-AA v2 panel
Capability, not speed: published harness scores for 5.3 against 5.2.
Scores from the official README table. GDPval-AA v2 uses its own scale.
HarnessGLM-5.3GLM-5.2What it covers
Terminal Bench 3.028.34.6Terminal-based coding tasks
CyberGym84.577.2Vulnerability discovery
DeepSWE v1.166.946.2Repository-level engineering
AutomationBench v1.0.648.226.2Workflow automation
Toolathlon Verified73.059.9Tool use
Agents' Last Exam, ALE-CLI28.523.8Long-horizon agent work
GDPval-AA v217691508Work-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.