Repository navigation
Conversation
…ger stalls other streams' rounds MiniMax-M3's Metal backend gains prefill_step and cancel_prefill, and now reports its fill (#3021). The prompt pass moves out of backend.zig into prompt_pass.zig; warm() keeps its stream-less feed. Each call runs one chunk at exactly the whole pass's cuts (the prompt chunk cap, then a planned start or kept mark inside the chunk); MiniMax declares no chunk invariance, so max_rows is ignored and the cuts never move. The whole pass and the steps share one chunk body, so replies are unchanged. Each step drains other streams' steps in flight before its forward, as the whole pass drained before it began. For a drafting stream that steps, each chunk's tapped rows are served by features() while no forward has rewritten that scratch, and a mark reached by the chunk is kept at the next call, after the drafter has absorbed it. A cancel keeps the state at the last chunk's end; a stream that leaves mid-pass is forgotten; image rows are made once, at the first call. Host tests on recording fakes: stepped chunks equal the whole loop's, a resumed pass cuts as main does, a cancel keeps the last chunk's end, another stream decodes between two chunks, and a drafter absorbs every chunk with the mark kept after its absorb. The new step joins the macOS host CI list.
…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.
A structural_tag request lists structures ({"begin", "schema", "end"}) and
optional triggers. The reply is free text, and each begin opens a region its
schema holds until its end. It compiles to xgrammar's triggered_tags through
the same compile path as the other formats, and region JSON keeps the
json_schema format's 32-blank cap. Without triggers, each begin that no
shorter begin starts is one; given triggers must each start a begin, and
every begin must start with exactly one. A 400 names the structure and field,
including for more than 64 structures or triggers, a tag past 256 bytes and
more than 512 KiB of grammar (grammar.max_text).
Requests without the format reach none of this: the json_schema reader is
split into a value and a stringify with the same text, and the unknown-type
message is unchanged. Host tests check the spec and every refusal; the
libtfgrammar walk covers free text, regions, a begin split across tokens,
the whitespace cap and the trigger rules.
Fixes #3184
…in a tool result loads them
Messages requests take a tool's defer_loading and a tool_result's
tool_reference blocks as Anthropic documents them, and chat completions
tool messages take {"type": "tool_reference", "name": ...} parts. A
template that reads both itself (GLM-5.3) gets them as sent. For any
other template the deferred tools leave the tools list, and a referenced
tool's name, description and parameters are written as text where the
reference stands, so the prompt before it is unchanged. A reference to a
tool the request does not offer, and a request whose tools are all
deferred, are refused with Anthropic's wording; server tool search tools
stay refused. Requests without these fields take the same path as before.
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.
CI for a landing train: #3089 #3121 #3208 #3212 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.