Skip to content

Optionally keep the Kimi3 route gather for 9 to 16 decode rows - #15

Draft
orangezed wants to merge 1 commit into
voipmonitor:release/k31-exl3-tp8-20261108from
orangezed:oz/k31-o-kimi3-route-rows16
Draft

orangezed wants to merge 1 commit into
voipmonitor:release/k31-exl3-tp8-20261108from
orangezed:oz/k31-o-kimi3-route-rows16

Conversation

@orangezed

Copy link
Copy Markdown

📌 Description

FLARE_KIMI3_ROUTE_ROWS=16 (default 8). It is read at import of kimi3/routing.py, so set it at export and serve. It raises routing.MAX_ROWS, which sets the route channel's capacity and the decoder's tokens <= ROUTE_ROWS gate. With it, verify batches of two concurrent speculative streams (9..16 rows) keep the b12x paired route gather + Kimi top-16 instead of the general path (latent all-reduce + router all-gather + route top-k). Values other than 8 or 16 raise.

It needs FlashInfer with 16-row kimi_topk16 (local-inference-lab/flashinfer NVIDIA#101), and it is meant for B12X_PCIE_DCP_PAIR_PUSH=1 (NVIDIA#91). The numbers, tests and topology notes are the same as in the FlashInfer PR: above 8 rows the MoE route step goes from ~51-54 us to ~15 us per layer at 9-10 rows on TP8.

FLARE_KIMI3_ROUTE_ROWS=16 (default 8) raises routing.MAX_ROWS, i.e. the
route channel's capacity and the decoder's tokens <= ROUTE_ROWS gate, so
verify batches of two concurrent speculative streams (9..16 rows) keep the
b12x paired route gather + Kimi top-16 instead of falling to the general
path (latent all-reduce + router all-gather + route top-k). Needs a b12x
whose kimi_topk16 accepts 16 rows; with an older b12x, preparing a 9..16-row
decoder fails loudly. Meant for B12X_PCIE_DCP_PAIR_PUSH=1. Any other value
than 8 or 16 raises. Default 8 keeps today's graphs.
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