Repository navigation
[MiniMax-M3.1] MXFP4 index cache and MXFP4 KV cache (--index-cache-dtype fp4, --kv-cache-dtype fp4) #2962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
+2,851
−413
Open
[MiniMax-M3.1] MXFP4 index cache and MXFP4 KV cache (--index-cache-dtype fp4, --kv-cache-dtype fp4) #2962
Changes from 82 commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
7b84f33
[MiniMax-M3.1] MXFP4 sparse KV pool and index-cache declaration
ganyi1996ppo 7f45385
[MiniMax-M3.1] MXFP4 write path: one fused kernel writes K, V and the…
ganyi1996ppo 82c136d
[MiniMax-M3.1] Score the MXFP4 index cache with aiter's FlyDSL scorer…
ganyi1996ppo f8db5ae
[MiniMax-M3.1] MXFP4 KV attention through aiter pa_decode; ATOM_M3_IN…
ganyi1996ppo 2e700ec
[MiniMax-M3.1] MXFP4 review fixes: padded replay, TBO plans, FP8-q re…
ganyi1996ppo 13f413d
[MiniMax-M3.1] Build the selector bounds from the captured batch on a…
ganyi1996ppo bb1719e
[MiniMax-M3.1] MXFP4 round 4: per-ubatch TBO score buffers, padded sc…
ganyi1996ppo 77b5ee9
[MiniMax-M3.1] MXFP4: size each TBO ubatch's score buffers for its ha…
ganyi1996ppo 55070fb
[MiniMax-M3.1] MXFP4: select the KV cache with --kv-cache-dtype mxfp4…
ganyi1996ppo 3157448
[MiniMax-M3.1] MXFP4: take the public cache dtype as fp4, not mxfp4
ganyi1996ppo bf89638
[MiniMax-M3.1] MXFP4: drop pass-through aliases and duplicate index-d…
ganyi1996ppo 26e1402
[MiniMax-M3.1] config: keep the literal deepseek_v41_text check the g…
ganyi1996ppo 1fe8b16
[MiniMax-M3.1] MXFP4 tests: cover KV-only and index-only fp4 writes a…
ganyi1996ppo 1aacf2c
[MiniMax-M3.1] MXFP4: resolve the index cache dtype through aiter's f…
ganyi1996ppo 9f42485
[MiniMax-M3.1] MXFP4: hold the index cache as "fp4x2" from init, reso…
ganyi1996ppo 4ec437c
[MiniMax-M3.1] MXFP4: keep the index cache "fp4" inside ATOM, name it…
ganyi1996ppo 1f1eb0b
[MiniMax-M3.1] MXFP4: name the sparse KV pool format "fp4", not "mxfp4"
ganyi1996ppo 1abc945
[MiniMax-M3.1] MXFP4: review follow-ups -- docs, error wording, M3 ga…
ganyi1996ppo b06f398
[MiniMax-M3.1] DSpark calibration identity: tell MXFP4 KV from fp8 KV
ganyi1996ppo 87ef9f9
[MiniMax-M3.1] MXFP4: M3's startup checks move to models/minimax_m3/c…
ganyi1996ppo a1f6a1e
[MiniMax-M3.1] MXFP4 KV needs a bf16 model: refuse an fp16 one at sta…
ganyi1996ppo 3172fd4
[MiniMax-M3.1] MXFP4 index score buffer: size rows for the step width…
ganyi1996ppo d7d86db
[MiniMax-M3.1] Address review: single fp4 dtype source, shared plan c…
ganyi1996ppo 487b695
Fix RUF028: keep the fmt: skip on a statement in the eager-width inde…
ganyi1996ppo e8ce8ea
Merge origin/main into ganyi/m31-mxfp4-main
ganyi1996ppo 09f14bb
Simplify MiniMax-M3 FP4 KV dtype routing
ganyi1996ppo 6c790ca
WIP: route MiniMax-M3 paged KV through MXFP4
ganyi1996ppo 6ffa554
Skip DSpark MXFP4 tests when aiter is unavailable
ganyi1996ppo 04b0b2d
Revert unvalidated all-layer MiniMax-M3 MXFP4 expansion
ganyi1996ppo 16c940a
Reject MiniMax-M3 --kv-cache-dtype fp4; keep the MXFP4 index cache only
ganyi1996ppo a874ae0
Skip the MXFP4 index tests on an aiter without the FP4 index ops
ganyi1996ppo 468d4f3
Drop the thin FlyDSL wrappers around the MXFP4 index scorers
ganyi1996ppo af92260
Add MiniMax-M3.1 MXFP4 KV cache with separate DSpark draft dtype
ganyi1996ppo 16aa94d
Restore the MiniMax-M3.1 MXFP4 KV tree; port only the M3 gate and dra…
ganyi1996ppo 94fb548
Review 5797687431: one decode row rule for every index cache, draft K…
ganyi1996ppo 10cbc61
Review 5781200929 B14/B15: read index_cache_dtype directly, fix the m…
ganyi1996ppo b643e36
Merge origin/main into ganyi/m31-mxfp4-main
ganyi1996ppo 453a7ad
Resolve duplicate kv_cache_dtype entries left by merging origin/main
ganyi1996ppo 05d2969
Merge origin/main into ganyi/m31-mxfp4-main
ganyi1996ppo a70e5d5
Review 5797687431 items 1/2: refuse fp4 KV beside a non-fp4 index; sc…
ganyi1996ppo 4e4dca9
MiniMax-M3: an unspecified dtype stays bf16, fp4 only when asked for
ganyi1996ppo cc42800
Copilot review: calibration without a draft, fill_blocks=0, KvLayout.…
ganyi1996ppo e8c8cbf
MXFP4 index scorer: allocate the scores per call, keep only the work …
ganyi1996ppo efb1f0f
MXFP4 index scorer: the work map is a builder attribute, not a forwar…
ganyi1996ppo dccfeaa
Merge origin/main into ganyi/m31-mxfp4-main (resolve conflicts)
ganyi1996ppo 7bbdd07
Drop IndexWorkMap/IndexWorkMapStep and the eager block-count shrink
ganyi1996ppo 97f7aac
Inline decode_rows_batch at its only call site
ganyi1996ppo cd12c4d
Decide "does the draft own a KV pool" once, off the selector in plugi…
ganyi1996ppo 7a3ef18
Key the MXFP4 row rule on the index cache, not on a kwargs dict's truth
ganyi1996ppo 62307b2
Carry the work map's block bound on the sparse metadata instead of re…
ganyi1996ppo 68fc39c
Give sparse_pa_mxfp4 an out= and zero the DP pad tail once, like SHUFFLE
ganyi1996ppo e2f7175
Drop the redundant fp4 factor from compute_hash and read spec.kv_cach…
ganyi1996ppo e2dc60c
Say which dtype and which cause the DSpark q_out dtype warning is about
ganyi1996ppo c741992
Delete the empty index_mxfp4.py and bring the stale docs and leftover…
ganyi1996ppo 620692b
Pass the MXFP4 decode scorer a persistent, unfilled, contiguous out=
ganyi1996ppo fd64ce3
Score the MXFP4 decode index into the indexers' LogitsWorkspace
ganyi1996ppo d7da994
Decide "the draft owns a KV pool" from the attention family, not by r…
ganyi1996ppo 669a967
Settle DeepSeek-V4's fp8 -> bf16 KV fallback in Config, before the dr…
ganyi1996ppo 773be3b
Answer "the draft owns a KV pool" for EAGLE3 as well as DSpark
ganyi1996ppo b587f52
Carry the MXFP4 index scorer's map, bound and workspace as one record…
ganyi1996ppo 785e40f
Give the MXFP4 prefill scorer the shared, unfilled score workspace too
ganyi1996ppo 294e392
Offer only the draft KV dtypes a draft can have: --spec-decode-kv-cac…
ganyi1996ppo 543e7f6
One source for M3's 128-token block, and one geometry check of an MXF…
ganyi1996ppo a75813c
Revert diff noise: moved test lines and a split one-line import
ganyi1996ppo 1ef8661
Say how the M3 K/V binding covers fp4 in its comment
ganyi1996ppo a7c2aca
State M3's fp4 rules once: in validate_runtime_config and the configu…
ganyi1996ppo ab7432c
Give IndexScoreBuffers an import-free home so the non-GPU suite can b…
ganyi1996ppo 9371309
Build the EAGLE3 draft at the dtype its pool was allocated at
ganyi1996ppo 4cc42e7
Skip the whole-batch MXFP4 scorer map on a decode that splits
ganyi1996ppo 224ae84
Address the 4cc42e7ed review: scorer allocation out of the MHA builde…
ganyi1996ppo e236bbc
Test that another index cache allocates no scorer, without aiter
ganyi1996ppo 5c76e58
Import FlyDSL where it is selected; ask the plugin question before re…
ganyi1996ppo da0c003
Merge origin/main into ganyi/m31-mxfp4-main
ganyi1996ppo c48f677
Clamp a pad row's causal length where the block-table emission takes …
ganyi1996ppo 75ffc24
Drop two tests that repeat a stricter test or the stdlib
ganyi1996ppo 0c514f9
Inline kv_pages_leave_pool, a one-line wrapper over bool(kv_transfer_…
ganyi1996ppo 2e3790a
Shorten the MXFP4 decode scorer docstring to what the buffers' docstr…
ganyi1996ppo 2995ae4
Record the aiter minimum the MiniMax-M3 index paths need (valarLip: b…
ganyi1996ppo 70bd1ad
Name aiter's writer formats from one table (B15, the mapping half)
ganyi1996ppo b60961e
Name aiter#7057, the fused MXFP4 writer, in the minimum-aiter note
ganyi1996ppo 212f185
Move --spec-decode-kv-cache-dtype out of this PR (valarLip 11-12 item 6)
ganyi1996ppo 2f174c2
MiniMax-M3.1: --kv-cache-dtype fp4 defaults the index cache to fp4; n…
ganyi1996ppo 96b7627
Trim the tests this PR adds: one test per behaviour, no plumbing or d…
ganyi1996ppo ec212f6
Shorten comments and docstrings that restate the code (no code change)
ganyi1996ppo 880044c
Keep the test that pins the draft-pool family table to the backends t…
ganyi1996ppo 2808171
Refuse the MXFP4 caches under decode context parallelism
ganyi1996ppo 015f202
Let the sparse impl declare its KV layout; type KvGeometry.layout; do…
ganyi1996ppo 7fe048d
Test: a graph capture must not allocate the scorer buffers it already…
ganyi1996ppo bd8fd40
Type KvGeometry.layout inside pool_layout; trim the comment and docs …
ganyi1996ppo ececbeb
Declare kv_layout once on the impl base; refuse MXFP4 KV under sequen…
ganyi1996ppo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.