Repository navigation
prompt cache: Nemotron and LFM2 MoE on CUDA keep message-start states by default (#3617 step 1) - #3696
Merged
Conversation
Owner
Author
|
/atc exchange dc14629f499087af0d335e32d9f9f79a5b9809a386512cb31a587009d0aab741 |
ashhart
force-pushed
the
lead/msg-starts-cuda
branch
4 times, most recently
from
November 21, 2026 05:02
3e5b81f to
eb80ead
Compare
…UDA families (#3617 step 1)
Follow main e54cb34, which moves CUDA command usage into main_usage.zig to keep the runner within 600 lines. Keep every current help row and add the incoming nemotron-request-starts and lfm2-moe-request-starts rows in that module. The two commands and their native-state checks are unchanged.
Keep the rebased invariant request-start assertion and paged request-cut call within 120 columns; behavior is unchanged.
ashhart
force-pushed
the
lead/msg-starts-cuda
branch
from
November 21, 2026 16:40
eb80ead to
be6cc02
Compare
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.
Step 1 of #3617: Nemotron and LFM2 MoE on CUDA keep prompt states at message starts by default, so an agent's next request resumes from where its last message began rather than re-reading the conversation. Both families' prefill gives the same bits wherever a prompt is cut, so a state kept at a message start equals the one a fresh pass computes there.
What changes. Request cuts at message starts are carried explicitly to native prefill (no callback context is reinterpreted). Marks that aren't cuts stay interior captures, as before. One cut-point switch covers both families, and the hooks stay within the existing prompt cache budget, slots and admission promises.
Tests. Host tests for the invariant-family cache rules and the request-start metadata. New native CUDA checks run real forwards and snapshot restores and compare device state, hidden rows, logits and the first token between a state kept at a message start and a fresh pass. The format check, the native CUDA and CUDA test-runner compiles, and lean (level with main) pass.
Before landing: these checks and served replies on GB10 (resumed equal to fresh, drafted equal to plain, one stream and several), with decode and prompt timings against main.