Skip to content

[II] Gather sharded Kimi projections through B12X - #346

Closed
voipmonitor wants to merge 1 commit into
agent/ii-kimi-sharded-qkv-afrom
agent/ii-kimi-b12x-projection-gather
Closed

voipmonitor wants to merge 1 commit into
agent/ii-kimi-sharded-qkv-afrom
agent/ii-kimi-b12x-projection-gather

Conversation

@voipmonitor

Copy link
Copy Markdown

Behavior

  • Routes a one-row BF16 or FP16 Kimi-K3 tensor-parallel projection gather through the public B12X DCP copy collective when VLLM_USE_B12X_DCP_A2A=1.
  • Pads each local projection row to the B12X transport contract and removes every rank's padding after the gather, preserving the exact rank-major payload.
  • Uses the tensor-parallel coordinator unless the DCP coordinator has the same ordered rank set.
  • Preserves tensor-parallel identity at TP1 and the standard vLLM all-gather for prefill, unsupported dtypes, non-CUDA tensors, and unsupported layouts.

Technical reason

The opt-in Kimi-K3 latent-projection sharding implemented by #345 requires every rank to reconstruct the full projection result. The B12X copy collective provides a CUDA-graph-compatible transport for decode without changing the projection's numerical representation.

Compatibility

Validation

Executed in voipmonitor/vllm:kimi-k3-qsrt-ii-vllm735952b-b12x180ccab-cu133-torch213-20260815-r3 with the changed source files mounted over the installed tree:

pytest -q tests/models/kimi_k3/test_tp_projection.py tests/models/kimi_k3/test_sequence_parallel.py
35 passed

Ruff formatting, Ruff lint, and git diff --check also pass for all changed files.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • dev/*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 75b98ecd-94eb-464a-920e-1dfff190552e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

The behavior implemented by this pull request is preserved unchanged in vLLM #385 as commit d872d25970fe. Stable Git patch IDs match. Review and merge #385; this pull request is closed to avoid duplicate review.

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