GLM 5.3 Flash
Serve GLM-5.3-Flash on NVIDIA or AMD GPUs. TokenSpeed automatically configures the GLM-5.3-Flash Kimi Delta Attention (KDA) and DeepSeek Sparse Attention (DSA) backends and supports multi-token prediction (MTP) from the base checkpoint. On platforms without DeepGEMM, the four-stream manifold hyper-connections (mHC) use a portable Triton path and switch to a tiled prefill projection above 256 tokens.
Prerequisites
- A TokenSpeed installation with the
tscommand. For installation instructions, see Getting started. - One of the following hardware and checkpoint configurations:
- NVIDIA: eight GPUs for
--tensor-parallel-size 8and access to thezai-org/GLM-5.3-Flashcheckpoint. - AMD: four MI350X or MI355X (gfx950) GPUs and access to the AMD Quark MXFP4 checkpoint.
- NVIDIA: eight GPUs for
- If you plan to serve multimodal requests,
ffmpeg.
Optional: Install ffmpeg for multimodal requests
If you plan to serve multimodal requests, install ffmpeg before starting the server:
apt-get update && apt-get install -y ffmpegTo verify the installation, run ffmpeg -version. The command prints the installed version.
Serve on NVIDIA
Start the server with the base checkpoint, eight-way tensor parallelism, expert parallelism, an FP8 KV cache, and MTP:
ts serve zai-org/GLM-5.3-Flash \
--trust-remote-code \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--moe-backend flashinfer_trtllm \
--kv-cache-dtype fp8 \
--draft-model-path-use-base \
--speculative-algorithm MTP \
--speculative-num-steps 2 \
--speculative-num-draft-tokens 3Serve on AMD MI350X or MI355X
Serve the AMD Quark MXFP4 checkpoint with --quantization mxfp4, tensor parallel size 4, and expert parallelism disabled. The checkpoint mixes MXFP4 and block-FP8 layers; its MXFP4 routed experts run the clamped SwiGLU on the gfx950 Gluon kernel. Pass --sampling-backend triton: without it AMD defaults to greedy sampling, which ignores per-request temperature, top_p, and top_k.
ts serve \
--model amd/GLM-5.3-Flash-Quark-MXFP4 \
--trust-remote-code \
--quantization mxfp4 \
--attn-tp-size 4 \
--ep-size 1 \
--kv-cache-dtype fp8 \
--max-model-len 65536 \
--max-num-seqs 16 \
--max-total-tokens 1048576 \
--chunked-prefill-size 8192 \
--max-prefill-tokens 8192 \
--max-cudagraph-capture-size 16 \
--cudagraph-capture-sizes 1 2 4 8 16 \
--sampling-backend triton \
--speculative-algorithm MTP \
--speculative-num-steps 3 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 4--max-total-tokens 1048576 holds sixteen concurrent 50K-token requests in the KV cache on four GPUs; a 524288-token budget queues some of them.
Verify the server
After starting either configuration, verify that the server is ready and can generate a response:
Check the readiness endpoint. If you changed
--hostor--port, replace the address in the command:bashcurl --fail http://127.0.0.1:8000/readinessWhen the server is ready, the command exits with status
0.Send a chat completion request. This example uses the NVIDIA checkpoint. If you used the AMD recipe, replace the
modelvalue withamd/GLM-5.3-Flash-Quark-MXFP4. If you changed--hostor--port, replace the request URL:bashcurl --fail http://127.0.0.1:8000/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{ "model": "zai-org/GLM-5.3-Flash", "messages": [{"role": "user", "content": "Reply with OK."}], "max_tokens": 8 }'A successful request returns a JSON response with a
choicesarray that contains the generated message.