Repository navigation
lanes: a learned row cost may fall below the table, and learning rounds reach the width they measure - #2777
Merged
Conversation
Merged
8 tasks done
…ds reach the width they measure Where a family learns shared rows' cost (learn_row_costs), a fit that clears the noise test now lowers the row price as well as raising it, bounded so a round never prices below its streams' plain width. While a stream count has no fit, its rounds reach the measured width (the likeliest drafts first), so a table that prices every draft out still gets its wider widths measured. Only how many drafts a round verifies changes; families that do not learn row costs are unchanged.
ashhart
force-pushed
the
lead/row-cost-both
branch
from
November 11, 2026 10:00
41cd6ba to
35c32f4
Compare
Open
1 task done
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
Where a family learns its shared rows' cost (
learn_row_costs), a fit showing rows cost less thanshared_costssays now lowers their price instead of counting as nothing. Before, a table timed on a slower build kept its slope forever and kept out drafts that would pay. The fall must clear the same two-sided noise test as a rise, and a round never prices below its streams' plain width (allocate.rowTerm). While a stream count has no fit, its rounds now reach the width they measure (HeadCost.least_rows, the likeliest drafts first) instead of only being capped there, so a table that prices every draft out still gets its wider widths measured.14dea6c6ad), one commit.atc overlap --json:shared_pricerow excess gets the same both-ways rule then.allocate.zig,windows.zig,shared_drafts.zig), which already conflicts with main on its own. If lfm2: DSpark drafting with owned context and confidence scheduling #1394 lands first, I rebase this onto it.Checks on this head
41cd6bae42a8b52f0cfc55cb9e91419ce4c00cb8zig test -lc --dep sys -Mroot=zig/src/core/lanes/lanes.zig -lc -Msys=zig/src/platform/sys.zig: 353 passed, 1 skipped, 0 failed. Five tests are new or changed, and each fails on main:allocate: the floor, and the bound at the plain width.row_cost: a falling fit lowers the price; a stale table is corrected down and capped; a learning round reaches each measured width, then nothing is forced.zig build test-lane-api-hostpasses (584 tests).zig fmt --check zig/src/core/lanes/clean.depth.zigis 598 lines.Receipt
learn_row_costs, and only on Macs without tensor units.TensorFold/GLM-5.3-Flash-MLX-4bit-MTP, and the M5 Ultra has tensor units, so it doesn't learn row costs.tools/bench_concurrent.pyat 1, 4 and 8 streams, greedy and sampled, main against this head, would settle it.extraMsandleastRowsare 0.rowTermreturns the old product for a row price at or above 0.least_rows0 is the old loop.Seen first on the community DeepSeek-V4.1 recipe on four DGX Sparks: a fork of our lane core whose row table was timed before its wide-MoE kernels. At 16 streams it kept every prose draft out (about one row a stream, ~16 tokens a ~83 ms round). The same fix for that fork is with its maintainer for a ring A/B.
Checklist
The title and description match the head commit, including the receipt and the stack.
New tests fail before the change, pass after it, and skip cleanly without their dependency.
Comments and docstrings are one line. No measurements or history in the source.
No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
Drafted output equals
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.No precision traded for speed. No bits change.
Decode and prompt processing are no slower than main: unmeasured on the one configuration it reaches (above).
Synthena (Ash's Agent)