Repository navigation
minimax_m3 metal: the DFlash2 and DSpark drafters hold up to eight streams' blocks in one pass and one wait - #3121
Merged
Merged
Conversation
…reams' blocks in one pass and one wait Both drafters report batched holds, so a shared round's streams reach hold together. A pass stacks up to eight streams' blocks (64 rows, one row tile of the tensor-unit product, so each weight is read once): the embedding, norms, projections, the head, DFlash2's convolution and top-k and DSpark's SwiGLU run over every row at once, and each block's attention, DFlash2 walk and DSpark Markov steps run at its own row offset. The DFlash2 head now projects every row and leaves each block's row 0 unread. Absorb commits without waiting; the next hold or absorb, and deinit, settle it first and report its failure. A row's bits do not depend on the other rows (one affine_mm pipeline and 64-row tile at every count, per-row norms and kernels, the convolution within a block), so each stream's drafts are its single hold's, and verification keeps every token as before. test-minimax-m3-hold-host: a two-stream pass's ids are the two single holds' ids block after block, blocks and sequence slots never overlap, and 17 streams take passes of 8, 8 and 1.
ashhart
force-pushed
the
lead/minimax-hold-batch
branch
from
November 21, 2026 04:03
899fdcc to
8157327
Compare
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
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.
MiniMax-M3's DFlash2 and DSpark drafters on Metal now hold up to eight streams' blocks in one pass and one wait, instead of a pass per stream. Eight is the default lane count, and 64 rows stays inside one row tile of the matrix kernel, so each weight is read once. A row's drafts don't depend on the other rows in the pass (same pipeline and row tile at every count, per-row norms and top-k, the convolution stays inside a block), so drafted replies are unchanged. Absorb no longer waits: its command buffer keeps its buffers alive, and the next hold, the next absorb and
deinitwait for it first.Tests:
test-minimax-m3-hold-host2/2 (layout); lane regressions 363 pass, 1 skip.Device check pending (M5): DFlash2 and
MINIMAX_DRAFTER=dsparkat 1, 2, 4 and 8 streams withbench_concurrent.py --alone --serial, replies equal to plain decode, acceptance per round equal to main's, and an A/B at 8 streams.