Conversation
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
gcanlin
requested review from
AndreasKaratzas,
DarkLight1337,
WoosukKwon,
njhill,
yewentao256 and
ywang96
as code owners
August 29, 2026 11:03
46 tasks
ZJY0516
reviewed
Sep 4, 2026
| parallel_config = vllm_config.parallel_config | ||
| logger.info_once( | ||
| "Kimi K3 model-level sequence parallelism is enabled " | ||
| "(TP=%d, PP=%d, MoE backend=%s).", |
Member
There was a problem hiding this comment.
Suggested change
| "(TP=%d, PP=%d, MoE backend=%s).", |
| self.media_placeholder: int = self.config.media_placeholder_token_id | ||
|
|
||
| def get_pp_intermediate_tensor_all_gather_overrides(self) -> dict[str, bool]: | ||
| getter = getattr( |
Member
There was a problem hiding this comment.
self.language_model should always has get_pp_intermediate_tensor_all_gather_overrides?
| logger = init_logger(__name__) | ||
|
|
||
|
|
||
| def get_pp_intermediate_tensor_all_gather_overrides( |
| # Non-last PP rank. | ||
| assert isinstance(model_output, IntermediateTensors) | ||
| intermediate_tensors = model_output | ||
| output_lengths = { |
Member
There was a problem hiding this comment.
I prefer this
output_token_counts = {
tensor.shape[0]
for tensor in intermediate_tensors.tensors.values()
}
assert len(output_token_counts) == 1
output_num_tokens = next(iter(output_token_counts))And we should have a util function for this beause it's used more than once in this PR
Preserve descriptor-specific SP output lengths in the shared capture output path, including microbatch capture. Co-authored-by: Codex <noreply@openai.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Declare the PP boundary token layout with a model attribute and share the transport policy across tensors. Reject compiler SP with PP and remove its residual reconstruction path. Preserve local output sizes and auxiliary hidden states across pipeline stages. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
gcanlin
requested review from
houseroad,
mgoin,
robertgshaw2-redhat,
tlrmchlsmth and
youkaichao
as code owners
September 14, 2026 10:03
Restore the legacy GPU model runner and its residual helper to main. Reject sequence-sharded PP with the legacy runner at model loading. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Remove the topology and backend details along with their formatting arguments, following review feedback. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Restore compiler SP configuration and legacy worker transport handling. Keep sequence-sharded model-level PP transport scoped to V2, and cover all three transport policies in worker tests. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Member
|
/ci run |
|
✅ @gcanlin, CI is now available for this PR.
|
|
✅ Triggered Buildkite CI #88833 for commit |
The fixture bypasses Worker.load_model, so explicitly provide the default replicated PP layout. Preserve the existing send synchronization assertions. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Contributor
Author
|
/ci retry |
|
✅ The previous CI build is still running: https://buildkite.com/vllm/ci/builds/88833 |
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #88883 for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Enable Kimi K3 model-level sequence parallelism (SP) when pipeline parallelism (PP) is also enabled. This lets the DeepGEMM MegaMoE path run with the production TP8/PP2/EP8 topology instead of disabling SP whenever PP > 1.
The implementation keeps tokens sequence-sharded across a PP boundary:
deep_gemm_mega_moe, including PP > 1. Non-MegaMoE behavior is unchanged.hidden_statesandresidualrows instead of sharding them a second time.hidden_statesandresidual. The default PP optimization assumes TP-replicated tensors and reconstructs them with a TP all-gather on the receiver. SP tensors are distinct across TP ranks, so matching TP ranks now send their shards directly without that all-gather.IntermediateTensorsview.Performance-sensitive details
Test Plan
Unit tests
pytest -q tests/models/kimi_k3/test_sequence_parallel.py \ -k "not sharded_sequence_parallel_mlp_matches_replicated"Result:
30 passed, 1 deselected. The nine newly added parameterized cases all pass.Two-node serving
Run the following command on both 8xB200 nodes. Set
NODE_RANK=0on the first node andNODE_RANK=1plusHEADLESS=--headlesson the second node.For the FI+EP baseline, remove
--kernel-config. For the FI/no-EP baseline, also remove--enable-expert-paralleland--all2all-backend deepep_v2. All other arguments remain identical.Prefill benchmark
Output length is fixed at one token, so total-token throughput is effectively prefill throughput.
Test Results
Hardware: 2 nodes x 8 B200, TP8/PP2, EP8 where enabled. Serving limits are
max_num_seqs=128andmax_num_batched_tokens=32768. Every arm completed 747 measured requests with zero failures.Total token throughput
Mean TTFT
The FI/no-EP 8192/c4 point has a repeatable scheduling/PP performance cliff when four chat-templated prompts cross the 32768-token step budget. A separate six-wave rerun measured 24,143 tok/s versus 24,734 tok/s in the paired three-wave run.
Accuracy results will be added after the full GSM8K evaluation completes.