Skip to content

Support GLM-5.2 DSpark config and block correctness - #31047

Open
tanth47 wants to merge 4 commits into
sgl-project:mainfrom
tanth47:codex/glm52-dspark-config-clean
Open

tanth47 wants to merge 4 commits into
sgl-project:mainfrom
tanth47:codex/glm52-dspark-config-clean

Conversation

@tanth47

@tanth47 tanth47 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What this PR does

  • Load the RedHat GLM-5.2 DSpark config format: DSparkDraftModel, nested transformer_layer_config, auxiliary hidden-state layers, and proposal gamma.
  • Align dense DSpark drafting with the checkpoint contract: one anchor token plus gamma proposed tokens.
  • Keep committed prefix lengths separate from reserved KV lengths during draft and target verify.
  • Fix compact verify anchor indexing when requests use different verify lengths.

Commit order

  1. Support GLM-5.2 DSpark draft config
  2. Align DSpark draft block with anchor slot
  3. Fix DFlash DSpark verify length metadata
  4. Fix DSpark compact anchor stride

Each commit has its focused regression tests.

Validation

Validated at fc09f91be, rebased on upstream f5155d960, using one MI350 GPU:

python3 -m pytest -q \
  test/registered/spec/dspark/test_glm52_dspark_config.py \
  test/registered/spec/dspark/test_dspark_draft_anchor_layout.py \
  test/registered/unit/spec/test_dflash_dspark_verify_lengths.py \
  test/registered/spec/dspark/test_dspark_kernel_parity.py
22 passed, 22 subtests passed

Also passed git diff --check and py_compile for every changed Python file.

Scope

  • This PR intentionally does not register the generic DSparkDraftModel entry class.
  • GLM/ROCm target-verify activation remains in Enable GLM-5.2 DSpark on ROCm #31260.
  • CUDA graph coverage, SPS/STS, zero-overhead scheduling, and performance tuning are out of scope here.

Acceptance rate

The current RedHat checkpoint is workload-sensitive. UltraChat-like prompts work reasonably well, while random, long-context, and code traffic can be much worse.

This PR validates the config/runtime contract so improved GLM speculators can be plugged in later. It does not claim workload-independent speedup from the current checkpoint.


CI States

Latest PR Test (Base): ❌ Run #30148542704
Latest PR Test (Extra): ❌ Run #30148542580

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@yiminghub2024

yiminghub2024 commented Jul 13, 2026

Copy link
Copy Markdown

@tanth47 glm-5.2-fp8 with redhat-ai dspark have some problem ,resault is that ,
acceptance rate is very low ,most of all request acceptance rate is less than 30% ,i have verifyed vllm0.25.0 with dspark, so the tps is no more than glm-5.2-fp8 without dspark

@tanth47

tanth47 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the heads up. That is exactly the failure mode I want to pin down before claiming accuracy/perf.

This PR is only the GLM-5.2 DSpark config loader. I am splitting the runtime fixes separately; the first stacked one is the anchor + gamma layout fix here: tanth47#15

Could you share the setup you used? Target/draft model, SGLang commit or image, launch command/env, TP/GPU/quantization, prompt set, sampling params/chat template, and how you computed AR/AL would be enough. If you have a small accept-length dump, even better.

I will try to reproduce the <30% AR case directly.

@tanth47

tanth47 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Accuracy update from a clean one-lane MI350 TP4 run.

This is not a claim that this config-only PR includes all runtime fixes; those remain split into follow-up PRs. I am adding the numbers here because this thread raised the <30% AR concern.

Setup:

  • Target: zai-org/GLM-5.2-FP8
  • Draft: RedHatAI/GLM-5.2-speculator.dspark
  • Prompt set: mgoin/GLM-5.2-FP8-magpie-ultrachat, 256 prompts
  • Generation: 128 new tokens per request, TP4 on MI350
  • Target-only oracle command needed ROCm/MI350 workarounds:
    • --json-model-override-args '{"qk_rope_head_dim":64}'
    • SGLANG_OPT_USE_TOPK_V2=0
    • SGLANG_DSA_FUSE_TOPK=0
    • --dsa-topk-backend torch
    • --fp8-gemm-backend aiter

Results:

target-only: 256/256 OK, 0 errors, 32768 completion tokens
DSpark:      256/256 OK, 0 errors, 32768 completion tokens

DSpark aggregate AL: 4.5278
DSpark aggregate AR: 51.01%
DSpark mean AL:      4.8114
DSpark mean AR:      55.14%
DSpark p50 AL/AR:    4.5714 / 52.04%

Artifacts:

/tmp/glm52-dspark-accuracy-one-lane-20260713T165709Z/target_256x128_summary.json
/tmp/glm52-dspark-accuracy-one-lane-20260713T165709Z/dspark_256x128_summary_refresh.json
/tmp/glm52-dspark-accuracy-one-lane-20260713T165709Z/compare_256x128_summary.json
/tmp/glm52-dspark-accuracy-one-lane-20260713T165709Z/target_aiterfp8_success.log

Important caveat:

  • Target-only vs DSpark exact token match is 0% in this run, so I am not using exact output matching as the correctness proof.
  • Correctness proof is the verifier trace gates: previous GLM-5.2 DSpark verifier traces pass with zero verifier failures, including compact/non-uniform verify and seeded non-greedy coverage.
  • Exact target-only comparison needs a stricter deterministic harness before it can be used as a pass/fail gate.

So far I cannot reproduce the “most requests <30% AR” behavior on this 256-prompt ultrachat slice. If you can share your exact model/image/launch command/prompt set/sampling params and AR calculation, I will try to reproduce that case directly.

@yiminghub2024

Copy link
Copy Markdown

run command
(APIServer pid=1) INFO 07-13 09:39:47 [api_utils.py:339] ▄▄ ▄█ █ █ █ ▀▄▀ █ version 0.25.0^M
(APIServer pid=1) INFO 07-13 09:39:47 [api_utils.py:339] █▄█▀ █ █ █ █ model /var/lib/gpustack/cache/model_scope/ZhipuAI/GLM-5.2-FP8^M
(APIServer pid=1) INFO 07-13 09:39:47 [api_utils.py:339] ▀▀ ▀▀▀▀▀ ▀▀▀▀▀ ▀ ▀^M
(APIServer pid=1) INFO 07-13 09:39:47 [api_utils.py:339]
(APIServer pid=1) INFO 07-13 09:39:47 [api_utils.py:273] non-default args: {'model_tag': '/var/lib/gpustack/cache/model_scope/ZhipuAI/GLM-5.2-FP8', 'enable_auto_tool_choice': True, 'tool_call_parser': 'glm47', 'enable_prompt_tokens_details': True, 'host': '10.91.3.213', 'port': 40014, 'disable_access_log_for_endpoints': '/metrics', 'model': '/var/lib/gpustack/cache/model_scope/ZhipuAI/GLM-5.2-FP8', 'trust_remote_code': True, 'max_model_len': 131072, 'served_model_name': ['glm-5.2-fp8-dspark'], 'reasoning_parser': 'glm45', 'tensor_parallel_size': 8, 'enable_expert_parallel': True, 'gpu_memory_utilization': 0.9, 'max_num_batched_tokens': 32768, 'max_num_seqs': 16, 'speculative_config': {'model': '/var/lib/gpustack/cache/model_scope/RedHatAI/GLM-5.2-speculator.dspark', 'num_speculative_tokens': 7, 'method': 'dspark'}}

acceptance log:
(APIServer pid=1) INFO 07-13 09:43:40 [launcher.py:46] Route: /inference/v1/generate, Methods: POST
(APIServer pid=1) INFO: Started server process [1]
(APIServer pid=1) INFO: Waiting for application startup.
(APIServer pid=1) INFO: Application startup complete.
(APIServer pid=1) INFO: 10.91.3.213:49466 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO: 10.91.3.213:49480 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO: 10.91.3.213:49500 - "GET /version HTTP/1.1" 200 OK
(APIServer pid=1) INFO: 118.195.150.70:49954 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO: 118.195.150.70:49954 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-13 09:49:10 [loggers.py:273] Engine 000: Avg prompt throughput: 1.3 tokens/s, Avg generation throughput: 14.7 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-13 09:49:10 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 1.35, Accepted throughput: 0.11 tokens/s, Drafted throughput: 2.28 tokens/s, Accepted: 38 tokens, Drafted: 756 tokens, Per-position acceptance rate: 0.259, 0.083, 0.009, 0.000, 0.000, 0.000, 0.000, Avg Draft acceptance rate: 5.0%
(Worker_TP0_EP0 pid=338) WARNING 07-13 09:49:10 [jit_monitor.py:129] Triton kernel JIT compilation during inference: _prepare_dflash_inputs_kernel. This causes a latency spike; consider extending warmup to cover this shape/config.
(APIServer pid=1) INFO: 118.195.150.70:50534 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-13 09:49:20 [loggers.py:273] Engine 000: Avg prompt throughput: 20.0 tokens/s, Avg generation throughput: 29.5 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-13 09:49:20 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 1.35, Accepted throughput: 7.60 tokens/s, Drafted throughput: 151.90 tokens/s, Accepted: 76 tokens, Drafted: 1519 tokens, Per-position acceptance rate: 0.286, 0.051, 0.014, 0.000, 0.000, 0.000, 0.000, Avg Draft acceptance rate: 5.0%
(APIServer pid=1) INFO 07-13 09:49:30 [loggers.py:273] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO: 118.195.150.70:59150 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-12 19:00:03 [loggers.py:273] Engine 000: Avg prompt throughput: 1.3 tokens/s, Avg generation throughput: 14.6 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:03 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 1.33, Accepted throughput: 1.13 tokens/s, Drafted throughput: 23.91 tokens/s, Accepted: 36 tokens, Drafted: 763 tokens, Per-position acceptance rate: 0.266, 0.055, 0.009, 0.000, 0.000, 0.000, 0.000, Avg Draft acceptance rate: 4.7%
(APIServer pid=1) INFO: 118.195.150.70:59150 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(Worker_TP0_EP0 pid=341) WARNING 07-12 19:00:05 [jit_monitor.py:129] Triton kernel JIT compilation during inference: _prepare_dflash_inputs_kernel. This causes a latency spike; consider extending warmup to cover this shape/config.
(APIServer pid=1) INFO 07-12 19:00:13 [loggers.py:273] Engine 000: Avg prompt throughput: 6.1 tokens/s, Avg generation throughput: 22.8 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:13 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 1.34, Accepted throughput: 5.70 tokens/s, Drafted throughput: 119.00 tokens/s, Accepted: 57 tokens, Drafted: 1190 tokens, Per-position acceptance rate: 0.229, 0.088, 0.012, 0.006, 0.000, 0.000, 0.000, Avg Draft acceptance rate: 4.8%
(APIServer pid=1) INFO: 118.195.150.70:51440 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-12 19:00:23 [loggers.py:273] Engine 000: Avg prompt throughput: 13.8 tokens/s, Avg generation throughput: 143.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.8%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:23 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 3.82, Accepted throughput: 105.50 tokens/s, Drafted throughput: 261.79 tokens/s, Accepted: 1055 tokens, Drafted: 2618 tokens, Per-position acceptance rate: 0.778, 0.612, 0.468, 0.342, 0.275, 0.201, 0.144, Avg Draft acceptance rate: 40.3%
(APIServer pid=1) INFO 07-12 19:00:33 [loggers.py:273] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 185.8 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.6%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:33 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 3.89, Accepted throughput: 137.99 tokens/s, Drafted throughput: 334.58 tokens/s, Accepted: 1380 tokens, Drafted: 3346 tokens, Per-position acceptance rate: 0.824, 0.657, 0.531, 0.366, 0.253, 0.155, 0.100, Avg Draft acceptance rate: 41.2%
(APIServer pid=1) INFO 07-12 19:00:43 [loggers.py:273] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 155.2 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 2.4%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:43 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 3.29, Accepted throughput: 108.00 tokens/s, Drafted throughput: 330.41 tokens/s, Accepted: 1080 tokens, Drafted: 3304 tokens, Per-position acceptance rate: 0.758, 0.597, 0.430, 0.258, 0.155, 0.061, 0.028, Avg Draft acceptance rate: 32.7%
(APIServer pid=1) INFO 07-12 19:00:53 [loggers.py:273] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 25.8 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-12 19:00:53 [metrics.py:120] SpecDecoding metrics: Mean acceptance length: 1.45, Accepted throughput: 8.00 tokens/s, Drafted throughput: 124.59 tokens/s, Accepted: 80 tokens, Drafted: 1246 tokens, Per-position acceptance rate: 0.326, 0.096, 0.017, 0.011, 0.000, 0.000, 0.000, Avg Draft acceptance rate: 6.4%
(APIServer pid=1) INFO 07-12 19:01:03 [loggers.py:273] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%

benchmark command:
image

summary:
almost all request accept is 0%
e2el 500s is more slow than no spark,tps is alow less than no spark @tanth47

@yiminghub2024

Copy link
Copy Markdown

more detail ablout glm-5.2-dspark refernce:

https://mp.weixin.qq.com/s/PFwWtXkMm6ZPliM6AAbhOw

@tanth47

@tanth47

tanth47 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the details. This helps.

One important difference: your run is vLLM 0.25.0 with TP8 + expert parallel + long context, not the SGLang path in this PR. So I do not want to compare the numbers 1:1 yet.

On the SGLang side, I reran a clean MI350 TP4 gate with the RedHat draft:

target: zai-org/GLM-5.2-FP8
draft:  RedHatAI/GLM-5.2-speculator.dspark
dataset: mgoin/GLM-5.2-FP8-magpie-ultrachat
256 prompts x 128 tokens
DSpark compact, no CUDA graph

256/256 OK
aggregate AL: 4.5676
aggregate AR: 51.61%
mean AL:      4.8148
mean AR:      55.23%

So I still cannot reproduce "almost all requests accept 0%" on the SGLang TP4 setup.

Your log is interesting though: it has both very low windows (mean acceptance length ~1.35) and later better windows (~3.8-3.9). That makes me suspect workload/template/runtime mode differences rather than just the RedHat draft being bad.

I will keep the SGLang runtime fixes split out from this config PR. If you can share a small request sample or the exact benchmark prompt template, I can run that same traffic through SGLang and compare AR/AL directly.

@yiminghub2024

yiminghub2024 commented Jul 14, 2026 via email

Copy link
Copy Markdown

@lisuizhe

lisuizhe commented Jul 15, 2026

Copy link
Copy Markdown

Thanks for the details. This helps.

One important difference: your run is vLLM 0.25.0 with TP8 + expert parallel + long context, not the SGLang path in this PR. So I do not want to compare the numbers 1:1 yet.

On the SGLang side, I reran a clean MI350 TP4 gate with the RedHat draft:

target: zai-org/GLM-5.2-FP8
draft:  RedHatAI/GLM-5.2-speculator.dspark
dataset: mgoin/GLM-5.2-FP8-magpie-ultrachat
256 prompts x 128 tokens
DSpark compact, no CUDA graph

256/256 OK
aggregate AL: 4.5676
aggregate AR: 51.61%
mean AL:      4.8148
mean AR:      55.23%

So I still cannot reproduce "almost all requests accept 0%" on the SGLang TP4 setup.

Your log is interesting though: it has both very low windows (mean acceptance length ~1.35) and later better windows (~3.8-3.9). That makes me suspect workload/template/runtime mode differences rather than just the RedHat draft being bad.

I will keep the SGLang runtime fixes split out from this config PR. If you can share a small request sample or the exact benchmark prompt template, I can run that same traffic through SGLang and compare AR/AL directly.

@tanth47 I have similar test result with @yiminghub2024
My test is on vllm v0.25.0, and using evalscope as benchmarking tool and random dataset as prompt input dataset.
In my case, I tested against different input token length, and here is the result:

  • in 256 input token length, ar=63.2%
  • in 2048 input token length, ar=44.4%
  • in 8192 input token length, ar=7.8%
  • in 16384 input token length, ar=5.0%

So as per my test, the current redhat dspark model in vllm tp8+ep path, the ar/al in long prompt is very low, so probrably you need to test against 8K or more input token to verify its al/ar

@dongyibo

Copy link
Copy Markdown

Looking forward to it!

@dongyibo

Copy link
Copy Markdown

@tanth47

Hello, I deployed it on H800 using your commit. The startup command is as follows:

python3 -m sglang.launch_server
--port 28056
--mem-fraction-static 0.75
--model-path /home/zai-org/GLM-5.2-FP8/
--nccl-init-addr "${TaskName}-master-0:20000"
--nnodes 2
--node-rank "$RANK"
--trust-remote-code
--host 0.0.0.0
--schedule-policy fcfs
--tp-size 16 --kv-cache-dtype fp8_e4m3
--tool-call-parser glm47 --reasoning-parser glm45 --grammar-backend xgrammar
--speculative-algorithm DSPARK --speculative-draft-model-path /home/RedHatAI/GLM-5.2-speculator.dspark

Then, several requests were tested, such as:
curl -X POST http://0.0.0.0:28056/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [
{
"role": "user",
"content": "hello"
}
],
"max_tokens": 256
}'

But it turns out the acceptance rates are very low:
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.87, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.02, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.93, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.78, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.79, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.02, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.11, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 2.00, accept rate: 0.14, cuda graph: True, gen throughput (token/s): 65.39, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.96, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 2.00, accept rate: 0.14, cuda graph: True, gen throughput (token/s): 65.78, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.32, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 29.98, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 31.32, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.06, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 32.92, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.07, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 1.00, accept rate: 0.00, cuda graph: True, gen throughput (token/s): 33.43, #queue-req: 0
[2026-07-16 08:00:43 TP0] Decode batch, #running-req: 1, #token: 192, token usage: 0.00, accept len: 2.00, accept rate: 0.14, cuda graph: True, gen throughput (token/s): 66.39, #queue-req: 0
...

@enternal111

Copy link
Copy Markdown

we also see low accept rate in glm-5.2-fp8.less than 1% using dspark(with vllm),around 15% using eager(with sglang)

@tanth47
tanth47 force-pushed the codex/glm52-dspark-config-clean branch from 0d3903e to fc09f91 Compare July 25, 2026 07:01
@tanth47 tanth47 changed the title Support GLM-5.2 DSpark draft config Support GLM-5.2 DSpark config and block correctness Jul 25, 2026
@tanth47

tanth47 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Cleaned this PR up and rebased it on current main.

It now includes the generic correctness pieces needed by this checkpoint format:

  • anchor + gamma draft layout
  • committed vs reserved verify-length metadata
  • compact verify anchor stride

It still does not register DSparkDraftModel; GLM/ROCm target-verify activation stays in #31260.

MI350 gate at fc09f91be: 22 passed, 22 subtests passed.

The AR caveat from the discussion still stands: the current RedHat checkpoint is workload-sensitive, so this is not a universal speedup claim.

@tanth47

tanth47 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@yiminghub2024 @lisuizhe @dongyibo @enternal111 Thanks all, these reports make sense. The current RedHat checkpoint is clearly workload-sensitive: UltraChat looks reasonable, but random, long-context, code, and very short prompts can be much worse.

I've scoped this PR to the config and runtime contract only. It does not enable GLM DSpark or claim general speedup; better checkpoints can plug into the same path later.

@dongyibo

dongyibo commented Jul 26, 2026

Copy link
Copy Markdown

@tanth47 hello~
Have you tried them?
1.https://huggingface.co/RedHatAI/GLM-5.2-speculator.dspark (latested update in 07/25)
2.https://huggingface.co/mgoin/GLM-5.2-speculator.dspark-block16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants