Skip to content

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 ts command. For installation instructions, see Getting started.
  • One of the following hardware and checkpoint configurations:
    • NVIDIA: eight GPUs for --tensor-parallel-size 8 and access to the zai-org/GLM-5.3-Flash checkpoint.
    • AMD: four MI350X or MI355X (gfx950) GPUs and access to the AMD Quark MXFP4 checkpoint.
  • 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:

bash
apt-get update && apt-get install -y ffmpeg

To 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:

bash
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 3

Serve 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.

bash
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:

  1. Check the readiness endpoint. If you changed --host or --port, replace the address in the command:

    bash
    curl --fail http://127.0.0.1:8000/readiness

    When the server is ready, the command exits with status 0.

  2. Send a chat completion request. This example uses the NVIDIA checkpoint. If you used the AMD recipe, replace the model value with amd/GLM-5.3-Flash-Quark-MXFP4. If you changed --host or --port, replace the request URL:

    bash
    curl --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 choices array that contains the generated message.

TokenSpeed documentation