[Model]Fuse MiniMax-M3 dense-layer KV-cache insert into qknorm+rope k… - #48935
Closed
lengrongfu wants to merge 1 commit into
Closed
lengrongfu wants to merge 1 commit into
lengrongfu wants to merge 1 commit into
Conversation
…ernel Signed-off-by: lengrongfu <lenronfu@gmail.com>
lengrongfu
marked this pull request as ready for review
July 20, 2026 15:24
lengrongfu
requested review from
AndreasKaratzas,
LucasWilkinson,
MatthewBonanni,
WoosukKwon,
mgoin,
tlrmchlsmth,
yewentao256 and
zyongye
as code owners
July 20, 2026 15:24
Contributor
Author
|
@yewentao256 Hi, can you help review this pr, current pr fused dense layer kv-cache insert into qknorm kernel. |
yewentao256
reviewed
Jul 24, 2026
yewentao256
left a comment
Member
There was a problem hiding this comment.
Thanks for the work, there are only 3 dense layers out of 60 for minimax m3, I don't think it will benefit a lot for e2e throughput/latency, and not worth the complexity we introduce here.
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
Dense layers previously ran the fused qknorm+rope kernel without cache args and let the generic Attention layer insert k/v via a separate reshape_and_cache_flash, costing an extra full HBM round-trip of k/v and a kernel launch per dense layer (the majority of M3 layers). The device kernel already supports insert without the index branch; this enables it end to end:
Test Plan
Test Result
vllm bench serve --served-model-name /new-model/MiniMax-M3-MXFP8/ --model /new-model/MiniMax-M3-MXFP8/ --tokenizer /new-model/MiniMax-M3-MXFP8/ --backend openai-chat --endpoint /v1/chat/completions --dataset-name random --random-input 1000 --random-output 100 --seed 130 --base-url http://localhost:8000 --num-prompts 10While ensuring no loss of progress, the optimized TPOT and TTFT show an average performance improvement of 2ms.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.