Skip to content

train 1119090004: #3438 #3704 #3816 (CI only) - #3935

Closed
ashhart wants to merge 10 commits into
mainfrom
lead/train-1119090004
Closed

ashhart wants to merge 10 commits into
mainfrom
lead/train-1119090004

Conversation

@ashhart

@ashhart ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #3438 #3704 #3816 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.

jayleaton and others added 10 commits November 19, 2026 09:00
…usage

A request may name "deadline_s" (seconds, more than 0, at most 1000000), for
chat and legacy completions. At that time the server cancels the engine
itself, still commits the tokens the engine gives before its finished event,
and labels the reply finish_reason "deadline". The final response keeps
usage and token_ids/token_sha256. A token the engine gives after the
deadline cancel may be EOS, hit a stop string or reach max_tokens; the
reply still ends "deadline". A deadline that passes after the reply already
ended (a stop string's own cancel) is not counted. Without the field
nothing changes.

A cancel from POST /v1/requests/{id}/cancel that came first keeps the
reply "cancelled": the deadline then sends no second cancel and never
relabels it. docs/api.md lists the field.

test-request-deadline-host: through chat.run and through openai.run (chat
and completions, whole and streamed): a forced deadline ends the reply with
finish deadline, the late token, usage and ids; no field and a deadline the
reply never meets give the same reply, token sha and stream choices; 0, -1,
"300", true and 1e7 are refused before the engine. A cancel ask before the
deadline, with an engine that ends late, still ends "cancelled".
…adline passes while it drains

A slow client could still be writing out tokens the engine had already
finished with (stop or length) when deadline_s passed; the server then sent
a cancel to the finished request and labelled the whole reply "deadline".
Before marking a deadline, the read loop now checks the mailbox's finished
flag under the mailbox's own mutex: an engine that ended first keeps its
finish reason and gets no cancel.

test-request-deadline-host: the engine ends inside submit, before the
50 ms deadline, and the first stream write takes 100 ms: the reply ends
"stop" with abcde and no cancel is sent (chat.run); over HTTP, for chat and
completions, whole and streamed, a reply the engine ended before the
deadline and the server first reads after it keeps "stop".
…tiles

On an M5 a decode round's cached-key attention ran six 16-row query tiles in one threadgroup on a long cache
(four below 64 chunks), so each chunk was read once for six tiles. Two tiles a threadgroup gives the GPU more
threadgroups and finishes the prefix pass sooner at every context measured; the kernel, its chunks and the merge
order are unchanged, so every row's sums are the same. Chips without tensor units keep six and four.
…decimal digits ('{+0}', '{-0}', '{0_0}' are Python keyword names and are refused; '{00}' is index 0), with refusal and parity probes and the changelog line
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Conflicts with main (main moved after stacking); restacking.

@ashhart ashhart closed this Nov 19, 2026
@ashhart
ashhart deleted the lead/train-1119090004 branch November 19, 2026 09:29
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.

4 participants