Skip to content

[Feat][Plugin] Enable Glm4Moe for vLLM plugin - #273

Merged
zejunchen-zejun merged 7 commits into
mainfrom
plugin_vllm_glm4moe
Mar 11, 2026
Merged

zejunchen-zejun merged 7 commits into
mainfrom
plugin_vllm_glm4moe

Conversation

@kliuae-amd

@kliuae-amd kliuae-amd commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

This PR extends ATOM's vLLM OOT plugin to support GLM4 series models.

Technical Details

  • Register Glm4Moe as supported model for plugin
  • Disable a16_mode in MoE when smooth scales are not present as the a16 fmoe kernel does not allow None-type smooth scales
  • Address kv scale loading in shuffled layout to fix accuracy drop when benchmarking in large batch sizes with fp8 kv cache

Test Plan

Accuracy test with lm_eval

Server command

ATOM_DISABLE_VLLM_PLUGIN=0 \
ATOM_DISABLE_VLLM_PLUGIN_ATTENTION=0 \
VLLM_LOGGING_LEVEL=DEBUG \
VLLM_USE_V1=1 \
VLLM_ROCM_USE_AITER=1 \
    vllm serve {zai-org/GLM-4.7, zai-org/GLM-4.7-FP8} \
    -tp 8 \
    --max-num-seqs 1024 \
    --gpu-memory-utilization 0.9 \
    --no-enable-prefix-caching \
    --disable-uvicorn-access-log \
    --trust-remote-code \
    --load-format fastsafetensors \
    --kv-cache-dtype {auto, fp8}

Test Result

zai-org/GLM-4.7

ATOM

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|_  |0.9500|_  |0.0060|
|     |       |strict-match    |     5|exact_match|_  |0.9462|_  |0.0062|

vLLM plugin (kv_cache_dtype=auto)

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|_  |0.9477|_  |0.0061|
|     |       |strict-match    |     5|exact_match|_  |0.9454|_  |0.0063|

vLLM plugin (kv_cache_dtype=fp8)

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|_  |0.9500|_  |0.0060|       
|     |       |strict-match    |     5|exact_match|_  |0.9484|_  |0.0061|

zai-org/GLM-4.7-FP8

ATOM

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|_  |0.9492|_  |0.0060|
|     |       |strict-match    |     5|exact_match|_  |0.9469|_  |0.0062|

vLLM plugin (kv_cache_dtype=fp8)

|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|_  |0.9484|_  |0.0061|
|     |       |strict-match    |     5|exact_match|_  |0.9454|_  |0.0063|

Performance on MI355X

zai-org/GLM-4.7

Input/Output Concurrency vLLM Plugin Req/s ATOM Req/s vLLM Plugin over ATOM vLLM Plugin Total tok/s ATOM Total tok/s vLLM Plugin over ATOM
1k/1k 128 3.66 3.77 -2.92% 7498.89 7723.09 -2.90%
1k/1k 64 2.14 2.24 -4.46% 4373.52 4589.54 -4.71%
8k/1k 128 1.86 1.92 -3.12% 17153.05 17704.88 -3.12%
8k/1k 64 1.32 1.39 -5.04% 12202.05 12813.00 -4.77%

zai-org/GLM-4.7-FP8

Input/Output Concurrency vLLM Plugin Req/s ATOM Req/s vLLM Plugin over ATOM vLLM Plugin Total tok/s ATOM Total tok/s vLLM Plugin over ATOM
1k/1k 128 4.46 4.66 -4.29% 9142.97 9540.86 -4.17%
1k/1k 64 2.51 2.66 -5.64% 5131.21 5451.97 -5.88%
8k/1k 128 2.12 2.22 -4.50% 19574.78 20463.52 -4.34%
8k/1k 64 1.50 1.57 -4.46% 13782.35 14495.91 -4.92%

Performance on MI300X

zai-org/GLM-4.7

Input/Output Concurrency vLLM Plugin Req/s ATOM Req/s vLLM Plugin over ATOM vLLM Plugin Total tok/s ATOM Total tok/s vLLM Plugin over ATOM
1k/1k 128 2.67 2.66 +0.38% 5475.38 5444.07 +0.58%
1k/1k 64 1.64 1.65 -0.61% 3365.67 3378.88 -0.39%
8k/1k 128 1.21 1.21 +0.00% 11158.95 11143.05 +0.14%
8k/1k 64 0.94 0.94 +0.00% 8641.29 8678.15 -0.42%

zai-org/GLM-4.7-FP8

Input/Output Concurrency vLLM Plugin Req/s ATOM Req/s vLLM Plugin over ATOM vLLM Plugin Total tok/s ATOM Total tok/s vLLM Plugin over ATOM
1k/1k 128 3.71 3.62 +2.49% 7593.45 7423.25 +2.29%
1k/1k 64 2.27 2.26 +0.44% 4654.19 4622.89 +0.68%
8k/1k 128 1.54 1.52 +1.32% 14170.79 14031.52 +0.99%
8k/1k 64 1.21 1.21 +0.00% 11118.88 11156.72 -0.34%

Submission Checklist

@zejunchen-zejun zejunchen-zejun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zejunchen-zejun
zejunchen-zejun merged commit 43ca1de into main Mar 11, 2026
16 checks passed
@zejunchen-zejun
zejunchen-zejun deleted the plugin_vllm_glm4moe branch March 11, 2026 12:58
Jasen2201 pushed a commit to Jasen2201/ATOM that referenced this pull request Apr 10, 2026
* add vllm OOT plugin support for glm4moe

Signed-off-by: kliuae <[email protected]>

* fp8 model

Signed-off-by: kliuae <[email protected]>

* fix large batch size accuracy

Signed-off-by: kliuae <[email protected]>

* format

Signed-off-by: kliuae <[email protected]>

* format

Signed-off-by: kliuae <[email protected]>

---------

Signed-off-by: kliuae <[email protected]>
Co-authored-by: kliuae <[email protected]>
Co-authored-by: wuhuikx <[email protected]>
zejunchen-zejun added a commit that referenced this pull request Dec 1, 2026
…4 747 tok/s/GPU (ASM prefill until LLM-Booster #273) (#4023)

* recipes: 455-k3-recipe.md as run on 12-01 (1P1D on e15; ASM prefill until LLM-Booster #273)

Squashes the 11-28 rewrite (1126 image, #813 config F on P, S1F on D) with what the 12-01 runs on four Helios
trays (P = PP8 x TP1 on e15-09 + 07, D = DP8 EP8 on e15-05 + 06) showed:

- Results, MLPerf Endpoints agentic, whole window: c1024 747 tok/s/GPU (22.4 tok/s/user, TTFT p50 6.23 s, TPOT
  p50 25.0 ms), c512 590, c192 383; DSpark acceptance 0.39-0.43; GSM8K 0.9621. The 11-22 G13 numbers stay as
  the reference.
- P's FP8 prefill attention on ASM (P_PREFILL_ATTN, default asm): on the FlyDSL path a prefill that hits a cached
  prefix comes out wrong on k3-455-dev (#273), which the multi-turn benchmark hits on almost every turn (DSpark
  acceptance 5%, c1024 521 tok/s/GPU). Plus a multi-turn check next to GSM8K.
- Software: k3-455-dev (with gyu's prefill stack since 11-30) + #3948 (PP mailbox) + ROCm/aiter#8978
  (#8778) + #4021 (test); the runs used zejun/k3-455-dev of both repos.
- Host rules from the crashes: one boot batch and amdgpu loaded on all four at the same moment, once per boot (a
  reload failed with smu -62); tcp_mtu_probing=1 against a content-dependent packet loss that hung D's gloo
  all_gather; TIKTOKEN_CACHE_DIR= (a crash left a 0-byte tiktoken cache entry that broke every later start).
- Knobs: DSPARK_K, DSPARK_CONFIG. The warmup stops ~3 min after it stops issuing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* recipes: 455-k3 c192 on DSpark k=6 (439 tok/s/GPU vs 383 at k=4)

DSPARK_K now defaults to 6 at POINT=c192 and stays 4 at c512 / c1024. 12-01, same deployment otherwise (P on
ASM prefill): c192 439 tok/s/GPU, 56.9 tok/s/user, TTFT p50 0.97 s, TPOT p50 14.3 ms, acceptance 0.32 per token
(k=4: 383, 47.0, 0.99 s, 13.8 ms, 0.43).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
gbyu-amd pushed a commit that referenced this pull request Dec 3, 2026
…4 747 tok/s/GPU (ASM prefill until LLM-Booster #273) (#4023)

* recipes: 455-k3-recipe.md as run on 12-01 (1P1D on e15; ASM prefill until LLM-Booster #273)

Squashes the 11-28 rewrite (1126 image, #813 config F on P, S1F on D) with what the 12-01 runs on four Helios
trays (P = PP8 x TP1 on e15-09 + 07, D = DP8 EP8 on e15-05 + 06) showed:

- Results, MLPerf Endpoints agentic, whole window: c1024 747 tok/s/GPU (22.4 tok/s/user, TTFT p50 6.23 s, TPOT
  p50 25.0 ms), c512 590, c192 383; DSpark acceptance 0.39-0.43; GSM8K 0.9621. The 11-22 G13 numbers stay as
  the reference.
- P's FP8 prefill attention on ASM (P_PREFILL_ATTN, default asm): on the FlyDSL path a prefill that hits a cached
  prefix comes out wrong on k3-455-dev (#273), which the multi-turn benchmark hits on almost every turn (DSpark
  acceptance 5%, c1024 521 tok/s/GPU). Plus a multi-turn check next to GSM8K.
- Software: k3-455-dev (with gyu's prefill stack since 11-30) + #3948 (PP mailbox) + ROCm/aiter#8978
  (#8778) + #4021 (test); the runs used zejun/k3-455-dev of both repos.
- Host rules from the crashes: one boot batch and amdgpu loaded on all four at the same moment, once per boot (a
  reload failed with smu -62); tcp_mtu_probing=1 against a content-dependent packet loss that hung D's gloo
  all_gather; TIKTOKEN_CACHE_DIR= (a crash left a 0-byte tiktoken cache entry that broke every later start).
- Knobs: DSPARK_K, DSPARK_CONFIG. The warmup stops ~3 min after it stops issuing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* recipes: 455-k3 c192 on DSpark k=6 (439 tok/s/GPU vs 383 at k=4)

DSPARK_K now defaults to 6 at POINT=c192 and stays 4 at c512 / c1024. 12-01, same deployment otherwise (P on
ASM prefill): c192 439 tok/s/GPU, 56.9 tok/s/user, TTFT p50 0.97 s, TPOT p50 14.3 ms, acceptance 0.32 per token
(k=4: 383, 47.0, 0.99 s, 13.8 ms, 0.43).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit ccdf37a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants