GLM-5.3-DSpark
This repository releases a DSpark draft model for GLM-5.3. It is a speculator, not a standalone LLM: pair it with a GLM-5.3 target (BF16 or FP8) in SGLang or vLLM.
- Draft model:
AlayaNeW/GLM-5.3-DSpark - Target model:
zai-org/GLM-5.3/zai-org/GLM-5.3-FP8 - Algorithm: DSpark (parallel block draft + Markov head + confidence head)
Architecture
| Field | Value |
|---|---|
| Architecture | Qwen3DSparkModel (qwen3_dspark) |
| Draft layers | 5 (4× sliding attention + 1× full attention) |
| Hidden size / head dim | 6144 / 128 |
| Attention | GQA, 64 Q heads, 16 KV heads |
| Sliding window | 2048 |
| Block size $\gamma$ | 8 |
| Target layers (KV inject) | [1, 20, 38, 56, 75] (GLM-5.3 has 78 layers) |
| Markov head | vanilla, rank 256 |
| Confidence head | enabled (with Markov features) |
| Vocab | 154880 (same as GLM-5.3) |
| Precision | bfloat16 |
Quick Start
Requires a recent SGLang or vLLM build with native DSpark support. This draft is for GLM-5.3 only.
Serve with SGLang
export SGLANG_ENABLE_SPEC_V2=1
sglang serve \
--model-path zai-org/GLM-5.3-FP8 \
--trust-remote-code \
--tp-size 8 \
--reasoning-parser glm45 \
--tool-call-parser glm47 \
--context-length 202752 \
--mem-fraction-static 0.83 \
--cuda-graph-max-bs 256 \
--max-running-requests 128 \
--disable-shared-experts-fusion \
--host 0.0.0.0 \
--port 8100 \
--speculative-algorithm DSPARK \
--speculative-draft-model-path AlayaNeW/GLM-5.3-DSpark \
--speculative-num-draft-tokens 9 \
--speculative-dspark-block-size 8
--speculative-num-draft-tokens is block size + 1.
Serve with vLLM
export VLLM_USE_V2_MODEL_RUNNER=1
vllm serve zai-org/GLM-5.3-FP8 \
--trust-remote-code \
--kv-cache-dtype fp8 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--tool-call-parser glm47 \
--enable-auto-tool-choice \
--reasoning-parser glm45 \
--enable-prefix-caching \
--max-model-len 202752 \
--max-num-seqs 256 \
--gpu-memory-utilization 0.90 \
--max-cudagraph-capture-size 256 \
--host 0.0.0.0 \
--port 8100 \
--served-model-name GLM-5.3 \
--speculative-config '{
"method": "dspark",
"model": "AlayaNeW/GLM-5.3-DSpark",
"num_speculative_tokens": 8,
"draft_sample_method": "probabilistic",
"kv_cache_dtype": "auto"
}'
The draft is bf16 dense. Keep the draft KV cache dtype on auto so it does not inherit the target's FP8 MLA KV cache.
Call the server
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8100/v1", api_key="EMPTY")
resp = client.chat.completions.create(
model="GLM-5.3",
messages=[{"role": "user", "content": "Write a Python function that checks if a number is prime."}],
max_tokens=1024,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(resp.choices[0].message.content)
Evaluation
- Runtime: SGLang on 8× NVIDIA H200 (TP8)
- Target:
zai-org/GLM-5.3-FP8 - Speculation block size: 8 (
--speculative-dspark-block-size 8,--speculative-num-draft-tokens 9) - Sampling: temperature 0.7, concurrency 10, max generation 4096
- Context-length numbers are the mean of 3 runs (50 prompts, SPEED-Bench low-entropy throughput)
- Qualitative numbers are one run on SPEED-Bench categories (80 prompts each)
Acceptance length is the per-request mean of completion tokens divided by verification steps. Higher is better. Per-position rates are percent.
Speed-Bench: Low Entropy
| Context Len | AL | Pos 0 | Pos 1 | Pos 2 | Pos 3 | Pos 4 | Pos 5 | Pos 6 | Pos 7 |
|---|---|---|---|---|---|---|---|---|---|
| 1k | 4.55 | 82.65 | 66.53 | 53.35 | 43.16 | 35.14 | 29.07 | 24.29 | 20.48 |
| 2k | 4.76 | 84.08 | 68.73 | 55.92 | 45.99 | 38.31 | 32.29 | 27.45 | 23.47 |
| 8k | 4.93 | 84.99 | 70.61 | 58.61 | 48.69 | 40.82 | 34.52 | 29.31 | 25.14 |
| 16k | 4.98 | 85.48 | 71.22 | 59.17 | 49.60 | 41.76 | 35.42 | 30.19 | 25.75 |
| 32k | 4.89 | 85.23 | 70.77 | 58.32 | 48.30 | 40.20 | 33.72 | 28.64 | 24.18 |
Speed-Bench: Qualitative
| Category | AL | Pos 0 | Pos 1 | Pos 2 | Pos 3 | Pos 4 | Pos 5 | Pos 6 | Pos 7 |
|---|---|---|---|---|---|---|---|---|---|
| coding | 4.60 | 84.01 | 67.95 | 54.73 | 44.02 | 35.76 | 29.25 | 24.20 | 20.22 |
| stem | 3.64 | 78.47 | 58.40 | 42.27 | 30.42 | 21.54 | 15.17 | 10.59 | 7.45 |
| humanities | 3.46 | 76.52 | 55.61 | 39.13 | 27.54 | 19.21 | 13.35 | 9.03 | 6.18 |
| math | 3.66 | 78.04 | 58.33 | 42.49 | 30.49 | 21.81 | 15.54 | 11.04 | 8.07 |
| multilingual | 4.77 | 83.99 | 68.72 | 56.02 | 46.37 | 38.54 | 32.49 | 27.46 | 23.18 |
| qa | 3.53 | 77.12 | 56.00 | 39.71 | 28.15 | 20.14 | 14.46 | 10.37 | 7.30 |
| rag | 4.71 | 84.06 | 68.93 | 56.67 | 46.01 | 38.02 | 31.06 | 25.52 | 21.01 |
| roleplay | 2.90 | 70.13 | 44.52 | 27.86 | 17.95 | 11.77 | 8.12 | 5.80 | 4.27 |
| reasoning | 3.90 | 78.72 | 59.27 | 44.31 | 33.53 | 25.73 | 20.00 | 15.95 | 12.73 |
| summarization | 4.95 | 86.97 | 73.33 | 60.79 | 50.35 | 41.10 | 33.40 | 27.50 | 22.14 |
| writing | 3.02 | 70.20 | 46.49 | 30.46 | 20.29 | 13.81 | 9.65 | 6.89 | 4.99 |
Citation
@misc{glm53dspark2026,
title={GLM-5.3-DSpark},
year={2026},
howpublished={\url{https://huggingface.co/AlayaNeW/GLM-5.3-DSpark}}
}