Skip to content

[II] Preserve FP32 and FP8 Kimi projection payloads - #349

Closed
voipmonitor wants to merge 1 commit into
agent/ii-kimi-b12x-projection-gatherfrom
agent/ii-kimi-projection-gather-dtypes
Closed

voipmonitor wants to merge 1 commit into
agent/ii-kimi-b12x-projection-gatherfrom
agent/ii-kimi-projection-gather-dtypes

Conversation

@voipmonitor

Copy link
Copy Markdown

Behavior

  • Extends the Kimi-K3 B12X projection gather to FP32 and FP8 E4M3 outputs.
  • Reinterprets FP32 values as one-byte transport lanes and restores FP32 after the gather; the operation performs no numerical conversion.
  • Transports FP8 E4M3 directly when its local row satisfies the B12X alignment contract.
  • Preserves the standard tensor-parallel all-gather fallback for unsupported dtypes or alignment.

Technical reason

The Kimi-K3 latent projection uses BF16, while the tensor-parallel router projection produces FP32 scores and online-quantized projections can produce FP8. These payloads require the same lossless decode transport without introducing a dtype conversion into routing or projection arithmetic.

Compatibility

  • This pull request is stacked on [II] Gather sharded Kimi projections through B12X #346.
  • No path changes unless Kimi projection sharding is active and VLLM_USE_B12X_DCP_A2A=1.
  • FP16 and BF16 behavior is unchanged.
  • Unsupported FP32 and FP8 widths retain the standard collective.

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
7 passed

The tests verify per-rank BF16 padding removal, bit-preserving FP32 transport, direct FP8 transport, coordinator selection, and exact fallback behavior. Ruff formatting, Ruff lint, and git diff --check also pass.

@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: 7ae5998e-deb0-4c19-9799-288580e05fc3

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 17b9f73216cc. 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