Skip to content

[MoE] Preserve TP sharding with explicit EP - #52100

Draft
LiuYinfeng01 wants to merge 4 commits into
vllm-project:mainfrom
LiuYinfeng01:feat/hybrid-tp-ep-moe-execution
Draft

[MoE] Preserve TP sharding with explicit EP#52100
LiuYinfeng01 wants to merge 4 commits into
vllm-project:mainfrom
LiuYinfeng01:feat/hybrid-tp-ep-moe-execution

Conversation

@LiuYinfeng01

@LiuYinfeng01 LiuYinfeng01 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve physical TP size/rank inside experts when explicit EP is configured
  • use the fixed-lane EP group for expert mapping and pre-I/O weight filtering
  • keep AG/RS dispatch/combine over EP and the existing late TP all-reduce
  • add coverage for TP4/EP2 config, Kimi expert ownership, loader filtering, final TP reduction, and the ROCm latent tail

Stacked on #52099. The topology commit disappears once #52099 merges.

Kimi-K3 has 896 routed experts. With EP2, each process owns 448 experts with TP4-sharded weights; four ranks in a TP group own distinct shards of the same 448-expert set. No Kimi production-code special case is required: the existing ROCm latent runner consumes the preserved physical TP size.

8-GPU validation

  • topology: TP4/DP2/EP2, AG/RS, target-only, 100K input + 1K output, concurrency 1
  • startup log: Local/global number of experts: 448/896; weight filter loads 448/896
  • execution log: MoEPrepareAndFinalizeNaiveDPEPModular + AiterExperts
  • numerical gate: GSM8K 100/100 strict, 100/100 flexible, zero errors/malformed
  • TPOT over 3 runs: 27.296 ms mean (27.107–27.447 ms); correctness passes, but this topology is not the C1 performance winner
  • non-MTP performance gate is met by TP8/DP1: 18.059 ms mean TPOT over 3 runs (18.056–18.062 ms)

Test plan

  • topology + generic execution suite — 13 passed
  • Kimi ROCm latent runner + hybrid MoE suite — 19 passed on 8 GPUs
  • Ruff check and format check on changed files
  • git diff --check
  • 8-GPU TP4/DP2/EP2 Kimi-K3 serving and GSM8K validation

Allow an experimental EP size independent of TP and construct fixed-lane EP groups while rejecting unsupported backends and parallel modes.

Signed-off-by: Liuyinfeng01 <yinfeliu@amd.com>
Use fixed-lane EP ownership for expert mapping and weight filtering while retaining tensor-parallel expert shards and the existing late TP reduction.

Signed-off-by: Liuyinfeng01 <yinfeliu@amd.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Exercise explicit EP2 ownership with Kimi-K3's 896 routed experts so each rank owns the validated 448-expert shard.

Signed-off-by: Liuyinfeng01 <yinfeliu@amd.com>
Verify that explicit EP2 keeps the physical TP4 shard for Kimi-K3's latent up-projection path.

Signed-off-by: Liuyinfeng01 <yinfeliu@amd.com>
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.

1 participant