Skip to content

perf(glm5next): dispatch mHC by token batch size - #498

Open
voipmonitor wants to merge 1 commit into
dev/jovian-judgementfrom
codex/glm53-mhc-dispatch-20260828
Open

perf(glm5next): dispatch mHC by token batch size#498
voipmonitor wants to merge 1 commit into
dev/jovian-judgementfrom
codex/glm53-mhc-dispatch-20260828

Conversation

@voipmonitor

Copy link
Copy Markdown

Resulting behavior

Status: implemented and qualified with local-inference-lab/vllm#493 for GLM-5.3 tensor parallel size 4.

Each GLM decoder layer selects B12X multipath hyperconnection for decode-sized rank-local token batches and TileLang multipath hyperconnection for larger prefill batches. The threshold accounts for scheduler sequence capacity, speculative depth, CUDA graph capture capacity, tensor parallelism, and sequence parallelism.

Every multipath-hyperconnection operation in one decoder-layer invocation uses the same backend, including deferred post-processing outside the decoder-layer forward call. Systems without a supported B12X multipath-hyperconnection implementation retain TileLang execution.

Source contract

  • Base: local-inference-lab/vllm:dev/jovian-judgement at c79f35ca00e8e93e0943a0d79b85b22b18aac939.
  • Head: 535f4def142f819a73597cd09bf357f7376d9b15.
  • Full CUDA graph deployment dependency: local-inference-lab/vllm#493, which retains B12X binding owners for the captured graph lifetime.
  • Backend selection uses rank-local token count and is constant across all multipath-hyperconnection operations in one layer invocation.

Validation

  • tests/models/test_glm5next_model.py -k 'mhc or hyperconnection': 7 passed, 27 deselected.
  • Repository pre-commit hooks, including Ruff, mypy, SPDX, forbidden-import, and configuration checks: passed.
  • git diff --check: passed.
  • GLM-5.3-Flash-NVFP4 W4A4 on four RTX PRO 6000 Blackwell GPUs sustained 13,280 prompt tokens/s for a 32,768-token cold-prefill profile and 117.2 output tokens/s for non-speculative concurrency-one decode in the PyNCCL qualification configuration.
  • The source composition with local-inference-lab/vllm#493 captured and replayed target-plus-DFlash2 graph families without B12X binding-storage reuse failures.

Duplicate-work check

Open upstream and local-inference-lab/vllm pull requests were searched for GLM multipath hyperconnection, B12X, TileLang, and token-batch dispatch. No open pull request implements this per-layer size dispatch. local-inference-lab/vllm#493 is complementary: it provides graph resource lifetime and does not choose the GLM multipath-hyperconnection backend.

Review disclosure

OpenAI Codex assisted with implementation, tests, profiling, benchmarking, and pull-request preparation. Human review of every changed line and the backend-selection threshold is required before merge.

Use B12X mHC for decode-sized rank-local batches, including CUDA graph padding, and TileLang mHC for larger prefill batches. The dispatch threshold derives from scheduler capacity, speculative depth, CUDA graph capacity, tensor parallelism, and sequence parallelism. Every mHC operation in a decoder layer uses the same selected backend.

Validated with GLM-5.3-Flash-NVFP4 in W4A4 mode on four RTX PRO 6000 Blackwell GPUs. A 32k-token standalone-prefill benchmark sustained 13,280 prompt tokens/s for 30 seconds; concurrency-one decode without speculative tokens sustained 117.2 tokens/s.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b2039a0f-f06c-4607-8563-ac40c48e11a2

📥 Commits

Reviewing files that changed from the base of the PR and between c79f35c and 535f4de.

📒 Files selected for processing (2)
  • tests/models/test_glm5next_model.py
  • vllm/models/glm5next/nvidia/model.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

1 participant