Repository navigation
perf(nemotron cuda): the lone driver takes thinking budgets and loop guards - #778
Merged
Merged
Conversation
It commits each round's kept rows as the lane core's windows read them (logprobRows on the window's logits) and opens the stream with the prompt's last row, so a lone logprobs request decodes on the lone driver's graphs and confidence depth rule.
…guards A stream with a budget past the driver's minimum or a loop guard decodes on the lone driver until a loop guard's close is pending or the budget's cut falls within the next round, then goes to the lane core, which forces the close as before.
7 of 8 tasks
jschmied
pushed a commit
to jschmied/TensorFold
that referenced
this pull request
Oct 13, 2026
jschmied
pushed a commit
to jschmied/TensorFold
that referenced
this pull request
Oct 13, 2026
The contributor's commit landed above with the same code, on top of ashhart#778's; this keeps the PR's head in the history with no change to the tree.
Owner
|
Thank you, @plotarmordev. Handing the stream over just before a forced close, and leaving the close itself to the lane core, keeps one place that forces it, and the 32-token floor makes the first round safe by construction. It landed in 1.0.9 under your name ( What we measured on a GB10 (sm_121), against the build without it:
|
Closed
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
The contributor's commits landed above with the same code, on top of ashhart#777's; this keeps the PR's head, which also holds ashhart#777's and the contributor's merge of the two CHANGELOG lines, in the history with no change to the tree.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
The contributor's commit landed above with the same code, on top of ashhart#778's; this keeps the PR's head in the history with no change to the tree.
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.
What this changes
On top of #777 (its commits come first here; this pull request adds the last three). Nemotron CUDA's lone driver takes a lone request with a thinking budget above 32 tokens, or with
--loop-guard. It hands the stream to the lane rounds just before the budget's cut falls within its next window, or when a loop guard's close is pending. The lane rounds force the close as before, so replies are unchanged. Budgets of 32 or fewer stay in the lane rounds from the start.stream.zig:budgetWithin(rows).cuda_lone.zig: the hand-over keeps only the tokens the commit landed;min_budget.engine_api.zigLone.min_budget,lane_host_lone.zigfits.Receipt
Environment: DGX Spark (GB10), Nemotron 3.5 Lightning MLX-4bit @
d9d758fb, on 1.0.8 (0efbd447),--context 16384 --parallel 4. Every server start measured its own window-cost table (a fresh cache), arms alternated.Exactness: thinking replies (700 tokens, two prompts) have the same
token_shaas 1.0.8 with no budget and with budgets of 20, 120, 400 and 4,000, each 3 times in 2 starts, and with--loop-guard. Pairs where a second request arrives 0.4 s later (budgets 120, 400, 4,000) also match. Drafted output equals"draft": falseat budgets of 200 and 2,000.Speed, per-request wall times across starts:
--loop-guard, no budget, prompts 1 / 2Tests run:
zig build test616/621 (5 skipped);test-cuda-host25/25 steps; server tests 155/155 and 96/96; goldens 309/319 with 0 unexpected differences;zig fmt;lean_checkas on 1.0.8.Not run, and why: Metal (unchanged). The NVFP4 checkpoint and RTX cards (no hardware here). The Grill's workloads set no thinking budget.
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.