Repository navigation
lanes: a copy window may be priced by its stream's own copies (Model.own_copy_rates) - #1380
Open
BlivionIaG wants to merge 1 commit into
Open
BlivionIaG wants to merge 1 commit into
BlivionIaG wants to merge 1 commit into
Conversation
…own_copy_rates) A shared round prices every copy window's rows at cfg.copy_rate, a fixed prior. A stream whose copies keep breaking (a different prompt on each stream, say) keeps paying verify rows for them. With Model.own_copy_rates a copy window is priced from the stream's own decayed copy history, by source (context or Recall), starting from four rows of copy_rate's prior; each verified copy window teaches its source's history. Off by default: without the flag allocation prices copies at copy_rate as before and the history is not kept. Test (copied_rate_test.zig): four streams' seven-row copy windows in one shared round, through windows.allocate. With the flag, after its context copies land one row of seven, a stream gets at most one copy row where the prior gave seven, the other streams keep theirs and its Recall copies keep copy_rate; without it every copy keeps seven rows and no history is kept.
This was referenced Oct 26, 2026
BlivionIaG
marked this pull request as ready for review
October 26, 2026 12:24
Owner
|
Thanks @BlivionIaG. This one reviewed clean on its own: default-off, no source defect found in its commit. It lands after a device check showing unchanged tokens and a per-family A/B. |
Contributor
Author
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.
Branch
series/lanes-copy-rates, 1 commit on main1e718458f:1e718458f. Sits on main. Part of #1374.What this changes
A shared round prices every copy window's rows (context and Recall copies) at
cfg.copy_rate, a fixed 0.94. WithModel.own_copy_ratesa copy window is priced from the stream's own decayed copy history, by source, starting fromfour rows of that prior. A stream whose copies keep breaking then stops paying verify rows for them. Off by default:
allocation prices copies at
copy_rateas before, and no history is kept.In the DSpark work this change was not opt-in: it changed every family's shared-round copy pricing. Here it is behind
a family flag. Nothing on main sets it. To keep the DSpark work's behaviour, the LFM2 PR has to set it for LFM2.
Measured with the flag forced on for every family (
l5on, M5 Ultra, three rounds each, on the code of1e718458f):Qwen3.5-2B and Nemotron-3.5-Lightning give the same tokens as main in every cell; the medians move -0.4% to +2.1%
(Nemotron code4 +2.1%, main spread 1.3%, l5on spread 3.0%). Qwen3.8-27B with DFlash2: tokens equal; its speed is within the build-to-build variation shown in #1382 (a second build of main differs by 1.0%). This is not a claim of benefit for other families; the flag stays off for them.
Receipts at this head
Unchanged by the review; mergeable with main. The field it adds is read only when the LFM2 DSpark drafter sets
own_copy_rates, so this head was not run on its own.Test that fails before the change (
copied_rate_test.zig, allocation pricing copies atcopy_rateas main does):242 pass, 1 fail(rows[0] <= 1). With the change: 243/243.Host gates (fresh cache):
Lean: 433 problems, 433 on main, 0 new.
A/B on current main (other families and builds)
M4 Pro, LFM2.5-24B-A2B 4-bit, no drafter, 4 streams, a different prompt on each, greedy 256 tokens, 4 alternated rounds, a fresh server per cell, a quiet machine (load under 2, no Zig build), every build merged with main
8c36359d5; aggregate tok/s by round:Every build is within 0.5% of main and every reply token-equal to main's. An earlier single-round run showed #1378 at -6% and #1379 at -4%; four rounds showed nothing, so those were session effects.
Not measured
Related PRs
Sits on main. Merges cleanly with #1378 and #1379. The DSpark scheduled PR (#1392) sits on it.