Skip to content

[Bugfix] Fix GLM-4 MoE router logits dtype for data parallel chunking#31055

Merged
DarkLight1337 merged 4 commits intovllm-project:mainfrom
ReinforcedKnowledge:fix-glm4-moe-dtype
Jan 6, 2026
Merged

[Bugfix] Fix GLM-4 MoE router logits dtype for data parallel chunking#31055
DarkLight1337 merged 4 commits intovllm-project:mainfrom
ReinforcedKnowledge:fix-glm4-moe-dtype

Conversation

@ReinforcedKnowledge
Copy link
Copy Markdown
Contributor

@ReinforcedKnowledge ReinforcedKnowledge commented Dec 20, 2025

Purpose

Fixes dtype mismatch in GLM4-MoE when using data parallel chunking with --all2all-backend pplx.

Root cause: GLM4-MoE uses float32 gates, but data parallel chunking pre-allocates buffers with the model's dtype (bfloat16). When --all2all-backend pplx is used, chunking is enabled and the dtype assertion fails.

The assertion that fails is this one: assert self.batched_router_logits.dtype == full_router_logits.dtype from vllm/model_executor/layers/fused_moe/layer.py, permalink.

The buffer is created with model's dtype in ensure_dp_chunking with self.batched_router_logits = torch.zeros(logits_shape, dtype=moe.in_dtype, device=torch.cuda.current_device()), permalink.

And the moe.in_dtype comes from vllm_config.model_config.dtype so in general it's a bfloat16.

But GLM4's gates explicitly use float32, there is an explanation in the code that explains why they can't use ReplicatedLinear as do some other MoEs and I think that's why this issue wasn't caught before or maybe wasn't caught by CI or something?

The router logits are thus flaot32 as well router_logits = self.gate(hidden_states.to(dtype=torch.float32)) in the forward.

So this causes a mismatch between the buffer's type and the actual logits.

The actual cause of this issue is not the simple mismatch, but the mismatch only happens when doing chunking. I thought it was the default but surprisingly it is not. When I disabled the pplx backend, I didn't get the error anymore. I think it's due to the conditions that check when to use dp chunking or not in use_dp_chunking.

So without the pplx backend, and without deepep kernels, the only way to trigger this is to use FP4. Which is surprising, and cool to learn haha

Conditions are:

    @property
    def use_dp_chunking(self) -> bool:
        return (
            self.moe_parallel_config.use_pplx_kernels
            or self.moe_parallel_config.use_deepep_ll_kernels
            or (self.dp_size > 1 and self.use_flashinfer_cutlass_kernels)
        ) and envs.VLLM_ENABLE_MOE_DP_CHUNK

I don't know if my fix is the best one. I'm casting the router logits to bf16 (well, hidden states' dtype to be precise, which should be robust), so there's some loss of precision there. Note: Gemini's agent suggested we can use self.experts.use_dp_chunking, didn't think about that initially was too focused on reproducibility of my bug, but since accepting its suggestion didn't follow the commit message format I see in the git log and since my commit wasn't verified, I had to amend and squash.

Test Plan

The following fails:

docker run --rm \
  --gpus '"device=0,1,2,3,4,5,6,7"' \
  --shm-size 10g \
  -p 8011:8011 \
  -v /mnt/nfs/username/hf_home:/root/.cache/huggingface/:rw \
  -e VLLM_RPC_TIMEOUT=1800 \
  vllm/vllm-openai:v0.13.0 \
  --model zai-org/GLM-4.6-FP8 \
  --served-model-name zai-org/GLM-4.6-FP8 \
  --tensor-parallel-size 1 \
  --data-parallel-size 8 \
  --enable-expert-parallel \
  --max-model-len 1024 \
  --max-num-seqs 4 \
  --max-num-batched-tokens 1024 \
  --kv-cache-dtype fp8 \
  --gpu-memory-utilization 0.85 \
  --all2all-backend pplx \
  --port 8000

If we remove --all2all-backend pplx it works. But my patch allows it to work with --all2all-backend pplx as well, to quick test it:

docker run --rm \
  --gpus '"device=0,1,2,3,4,5,6,7"' \
  -p 8011:8011 \
  -v /mnt/nfs/username/hf_home:/root/.cache/huggingface/:rw \
  -v /path/to/patched/glm4_moe.py:/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/glm4_moe.py:ro \
  -e VLLM_RPC_TIMEOUT=1800 \
  vllm/vllm-openai:v0.13.0 \
  --model zai-org/GLM-4.6-FP8 \
  --served-model-name zai-org/GLM-4.6-FP8 \
  --tensor-parallel-size 1 \
  --data-parallel-size 8 \
  --enable-expert-parallel \
  --max-model-len 1024 \
  --max-num-seqs 4 \
  --max-num-batched-tokens 1024 \
  --kv-cache-dtype fp8 \
  --gpu-memory-utilization 0.85 \
  --all2all-backend pplx \
  --port 8000

/path/to/patched/glm4_moe.py: is just the path to the file from my fork.

Test Result

Before (without fix):

  (EngineCore_DP1 pid=270) ERROR 12-19 17:14:18 [core.py:866] vllm/model_executor/layers/fused_moe/layer.py, line 1786, in forward_impl_chunked
  (EngineCore_DP1 pid=270) ERROR 12-19 17:14:18 [core.py:866]     assert self.batched_router_logits.dtype == full_router_logits.dtype
  (EngineCore_DP1 pid=270) ERROR 12-19 17:14:18 [core.py:866]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  (EngineCore_DP1 pid=270) ERROR 12-19 17:14:18 [core.py:866] AssertionError

Workaround (removing --all2all-backend pplx): Works, but can't use PPLX optimizations.

After (with fix): Server starts successfully with --all2all-backend pplx.

Related issue: #31056

Environment info

==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.9.1+cu128
Is debug build               : False
CUDA used to build PyTorch   : 12.8
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.12 (main, Oct 28 2025, 12:10:49) [Clang 20.1.4 ] (64-bit runtime)
Python platform              : Linux-6.2.0-1015-nvidia-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   :
GPU models and configuration :
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

Nvidia driver version        : 550.90.07
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      52 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             144
On-line CPU(s) list:                0-143
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8452Y
CPU family:                         6
Model:                              143
Thread(s) per core:                 2
Core(s) per socket:                 36
Socket(s):                          2
Stepping:                           8
CPU max MHz:                        3200,0000
CPU min MHz:                        800,0000
BogoMIPS:                           4000.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          3,4 MiB (72 instances)
L1i cache:                          2,3 MiB (72 instances)
L2 cache:                           144 MiB (72 instances)
L3 cache:                           135 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-35,72-107
NUMA node1 CPU(s):                  36-71,108-143
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

==============================
Versions of relevant libraries
==============================
[pip3] numpy==2.3.5
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.3.20
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] torch==2.9.1
[pip3] triton==3.5.1
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.14.0rc1.dev7+g9187de9fa.d20251220 (git sha: 9187de9fa, date: 20251220)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
  	GPU0	GPU1	GPU2	GPU3	GPU4	GPU5	GPU6	GPU7	NIC0	NIC1	NIC2	NIC3	NIC4	NIC5	NIC6	NIC7	NIC8	NIC9	NIC10	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	NV18	NV18	NV18	NV18	NV18	NV18	NV18	PIX	PXB	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE	0-35,72-107	0		N/A
GPU1	NV18	 X 	NV18	NV18	NV18	NV18	NV18	NV18	PXB	PIX	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE	0-35,72-107	0		N/A
GPU2	NV18	NV18	 X 	NV18	NV18	NV18	NV18	NV18	NODE	NODE	PIX	PXB	NODE	NODE	SYS	SYS	SYS	SYS	NODE	0-35,72-107	0		N/A
GPU3	NV18	NV18	NV18	 X 	NV18	NV18	NV18	NV18	NODE	NODE	PXB	PIX	NODE	NODE	SYS	SYS	SYS	SYS	NODE	0-35,72-107	0		N/A
GPU4	NV18	NV18	NV18	NV18	 X 	NV18	NV18	NV18	SYS	SYS	SYS	SYS	SYS	SYS	PIX	PXB	NODE	NODE	SYS	36-71,108-143	1		N/A
GPU5	NV18	NV18	NV18	NV18	NV18	 X 	NV18	NV18	SYS	SYS	SYS	SYS	SYS	SYS	PXB	PIX	NODE	NODE	SYS	36-71,108-143	1		N/A
GPU6	NV18	NV18	NV18	NV18	NV18	NV18	 X 	NV18	SYS	SYS	SYS	SYS	SYS	SYS	NODE	NODE	PIX	PXB	SYS	36-71,108-143	1		N/A
GPU7	NV18	NV18	NV18	NV18	NV18	NV18	NV18	 X 	SYS	SYS	SYS	SYS	SYS	SYS	NODE	NODE	PXB	PIX	SYS	36-71,108-143	1		N/A
NIC0	PIX	PXB	NODE	NODE	SYS	SYS	SYS	SYS	 X 	PXB	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE				
NIC1	PXB	PIX	NODE	NODE	SYS	SYS	SYS	SYS	PXB	 X 	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE				
NIC2	NODE	NODE	PIX	PXB	SYS	SYS	SYS	SYS	NODE	NODE	 X 	PXB	NODE	NODE	SYS	SYS	SYS	SYS	NODE				
NIC3	NODE	NODE	PXB	PIX	SYS	SYS	SYS	SYS	NODE	NODE	PXB	 X 	NODE	NODE	SYS	SYS	SYS	SYS	NODE				
NIC4	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE	NODE	NODE	NODE	 X 	PIX	SYS	SYS	SYS	SYS	NODE				
NIC5	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE	NODE	NODE	NODE	PIX	 X 	SYS	SYS	SYS	SYS	NODE				
NIC6	SYS	SYS	SYS	SYS	PIX	PXB	NODE	NODE	SYS	SYS	SYS	SYS	SYS	SYS	 X 	PXB	NODE	NODE	SYS				
NIC7	SYS	SYS	SYS	SYS	PXB	PIX	NODE	NODE	SYS	SYS	SYS	SYS	SYS	SYS	PXB	 X 	NODE	NODE	SYS				
NIC8	SYS	SYS	SYS	SYS	NODE	NODE	PIX	PXB	SYS	SYS	SYS	SYS	SYS	SYS	NODE	NODE	 X 	PXB	SYS				
NIC9	SYS	SYS	SYS	SYS	NODE	NODE	PXB	PIX	SYS	SYS	SYS	SYS	SYS	SYS	NODE	NODE	PXB	 X 	SYS				
NIC10	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	NODE	NODE	NODE	NODE	NODE	NODE	SYS	SYS	SYS	SYS	 X 				

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_8
  NIC7: mlx5_9
  NIC8: mlx5_10
  NIC9: mlx5_11
  NIC10: mlx5_bond_0

==============================
     Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +206 to +209
# router_logits: (num_tokens, n_experts)
router_logits = self.gate(hidden_states.to(dtype=torch.float32))
router_logits = self.gate(hidden_states.to(dtype=torch.float32)).to(
dtype=hidden_states.dtype
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Downcasting router logits reduces routing precision

The router output is now cast to hidden_states.dtype, so even in the default (non–DP-chunking) path GLM-4 MoE now runs softmax/top-k on bf16/fp16 instead of the float32 logits it previously produced by explicitly casting the input and keeping the gate weights in float32. This precision drop alters expert selection whenever chunking is not enabled, affecting inference quality across normal deployments; the chunking buffer mismatch could be resolved without changing the non-chunked routing dtype.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a critical dtype mismatch issue that occurs when running GLM-4 MoE models with data parallel chunking, which previously led to an AssertionError. Your fix correctly resolves this by casting the router_logits to the expected data type. However, the current implementation applies this cast unconditionally, which could lead to a loss of precision and potentially affect model accuracy even when data parallel chunking is not in use. I've suggested a small refinement to make this cast conditional, applying it only when use_dp_chunking is active. This change will preserve the model's full precision for all other scenarios.

Copy link
Copy Markdown
Member

@yewentao256 yewentao256 left a comment

Choose a reason for hiding this comment

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

Thanks for the work!
Is there any other way to fix this? I am worried changing dtype during forward, which may reduce performance

@ReinforcedKnowledge
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback!

I totally agree, I'm not comfortable with that change either. Here's how I see it, the issue is the assert that checks the buffer's dtype against the logits' dtypes right. So there are three solutions imho:

  1. Remove the assertion, I think we can both agree this is a bad idea hahaha
  2. Change the buffer's dtype, we can either have something that checks whether there's a gate and whether it's float32 and automatically allocate a float32, or we can make the buffer's dtype configurable with some backwards compatible default in FusedMoE's __init__. The dtype will be passed (if needed, like in this case of a bug) by whoever writes the implementation of the model through SharedFusedMoE. But in this case we'll allocate more memory for the router logits, which should not be a huge issue.
  3. Accept the loss of precision in this very specific case of models under dp chunking (so even FP4 I think, but I didn't check that particular case and can't right now but will do as soon as I can).

Let me know what you think is the best and I'll implement it right away 😄

I didn't go thoroughly through each MoE model's implementations especially since most of them don't suffer from this issue due to ReplicatedLinear, but I string matched on router_logits.to(hidden_states.dtype) and found it used in vllm/vllm/model_executor/models/bailing_moe.py at line 311. I wonder if they suffered from the same issue or if it was due to something else.

GLM-4 MoE uses float32 for router logits but DP chunking buffers
were allocated using in_dtype (bfloat16), causing dtype mismatch
with pplx backend. This adds a configurable router_logits_dtype
parameter to FusedMoE that defaults to in_dtype for backward
compatibility, allowing models to specify float32 when needed.

Signed-off-by: ReinforcedKnowledge <reinforced.knowledge@gmail.com>
@ReinforcedKnowledge
Copy link
Copy Markdown
Contributor Author

Hey!

I've updated the PR to use a configurable router_logits_dtype parameter instead of casting during forward pass. This allows model writers to specify the dtype for router logits buffers. It defaults to in_dtype so everything else should work the same as before and MoE with ReplicatedLinear or something similar won't have to bother.

Copy link
Copy Markdown
Member

@yewentao256 yewentao256 left a comment

Choose a reason for hiding this comment

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

Sorry for the late response. LGTM, thanks for the work!

Could you also test the E2E accuracy using lm_eval ... and performance using vllm bench ...?

@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 5, 2026
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) January 5, 2026 20:17
@ReinforcedKnowledge
Copy link
Copy Markdown
Contributor Author

ReinforcedKnowledge commented Jan 6, 2026

Hey! No worries at all!

I've ran some E2E accuracy and performance testing, please let me know if they're not enough, or if you want me to optimize them for throughput or something else. I just used some values I knew would work out of the box but not necessarily optimal.

The hardware is 8× NVIDIA H100 80GB GPUs.

E2E accuracy test with TP=8

lm_eval --model vllm \
--model_args "pretrained=zai-org/GLM-4.6-FP8,tensor_parallel_size=8,enable_expert_parallel=true,add_bos_token=true,max_model_len=8192,gpu_memory_utilization=0.80,max_num_seqs=100" \
--tasks gsm8k \
--num_fewshot 5 \
--limit 1000 \
--batch_size auto

Results:

  • Accuracy (flexible-extract): 0.941 ± 0.0075
  • Accuracy (strict-match): 0.937 ± 0.0077

Performance test with TP=8

vllm bench throughput \
--model zai-org/GLM-4.6-FP8 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--max-model-len 8192 \
--gpu-memory-utilization 0.80 \
--max-num-seqs 100 \
--input-len 2048 \
--output-len 512 \
--num-prompts 1000 \
--dataset-name random

Results:

  • Throughput: 9.38 requests/s
  • Total tokens/s: 10,808.30
  • Output tokens/s: 1,200.92
  • Total input tokens: 1,024,000
  • Total output tokens: 128,000

The tests above do not go through the buggy path. The test below does:

E2E accuracy test with TP=2 + DP=4 (validates DP chunking fix)

VLLM_USE_FLASHINFER_MOE_FP8=1 lm_eval --model vllm \
--model_args "pretrained=zai-org/GLM-4.6-FP8,tensor_parallel_size=2,data_parallel_size=4,enable_expert_parallel=true,add_bos_token=true,max_model_len=8192,gpu_memory_utilization=0.80,max_num_seqs=20" \
--tasks gsm8k \
--num_fewshot 5 \
--limit 1000 \
--batch_size auto

Results:

  • Accuracy (flexible-extract): 0.945 ± 0.0072
  • Accuracy (strict-match): 0.942 ± 0.0074

I didn't run the vllm bench throughput ... on this one because it requires an external launcher with DP. I could copy paste the code from throughput into a script that would work with torchrun but then you'd have to verify that the script does things as intended and it's extra work for you, but I can do it if you're cool with that.

Also, I have noticed there are some failing CI checks, but I don't believe they're related to my changes. Happy to investigate further if needed.

@DarkLight1337 DarkLight1337 merged commit 4e67a8f into vllm-project:main Jan 6, 2026
58 checks passed
yugong333 pushed a commit to yugong333/vllm that referenced this pull request Jan 9, 2026
…vllm-project#31055)

Signed-off-by: ReinforcedKnowledge <reinforced.knowledge@gmail.com>
akh64bit pushed a commit to akh64bit/vllm that referenced this pull request Jan 16, 2026
…vllm-project#31055)

Signed-off-by: ReinforcedKnowledge <reinforced.knowledge@gmail.com>
dsuhinin pushed a commit to dsuhinin/vllm that referenced this pull request Jan 21, 2026
…vllm-project#31055)

Signed-off-by: ReinforcedKnowledge <reinforced.knowledge@gmail.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
…vllm-project#31055)

Signed-off-by: ReinforcedKnowledge <reinforced.knowledge@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants