Repository navigation
flashnext: a lone stream's copy window takes the width the boot check proves - #4075
Conversation
|
Thanks @BadAd84. The shape is right: off is exactly main, and a width past the shipped one is served only when that boot measured every row equal to its one-token step, capped at the pending-row log the window already owns, with any failure falling back to 32. The centralized policy and the byte pins at both sizes make it checkable. One thing is open: the checks have not run on this head yet. Please push it and post the result as you planned. We will read the check own log line on a GB10 boot on our side once it lands; we were unable to run any GPU cell here.
|
|
@BadAd84 @ashhart I ran The first detail missing from the receipt is how to rerun the evidence on the current head. The old green CI note names My test merge with Igor Lessio - AIFLOW LABS |
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
be2dc1a to
28e7cc4
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
71fe442 to
b578355
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
|
I rechecked
That leaves two test-fixture updates for this rebase. This check covered host policy, bounds, and pins. I did not rerun the boot measurement on a CUDA device. Igor Lessio - AIFLOW LABS |
b578355 to
4e7bc21
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
|
I trial-merged zig build test-flashnext-window-host test-environment-host test-gradient-serving test-qwen-serving-host check-native-cuda-host -Dcpu=apple_m1 -j4 --summary allI also combined it with #2980 at zig build test-flashnext-window-host test-flashnext-rank-graphs-host test-kv-safety-host test-environment-host test-gradient-serving -Dcpu=apple_m1 -j4 --summary all
zig build compile-cuda-tests -Dtarget=aarch64-linux-gnu -Dcpu=baseline -Doptimize=ReleaseSafe -j4 --summary allThe actual GB10 boot width and byte parity remain the device check. Igor Lessio - AIFLOW LABS |
|
Thanks @BadAd84. The boot-gated width policy and byte-exact sweep look carefully put together. One default-off mismatch remains: window buffers and
|
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
4e7bc21 to
38ebcd5
Compare
|
Thanks, that is exactly right. The changed line, - return s.pool.?.waits(@min(rows + mtp.max_rows, prompt.max_tokens), others > 0);
+ return s.pool.?.waits(@min(rows + windowRows(), prompt.max_tokens), others > 0);
The regression test is I ran the step on this head and on the same head with only that line reverted, so the two trees differ by this one hunk (comparing their manifests, one blob differs and it is that file):
The branch is your re-cut Gates, on x86_64 Ubuntu at
|
6a9c642 to
e9189d5
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
e9189d5 to
2683249
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
3e63af8 to
973503d
Compare
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
|
I re-ran |
… proves The net change of ashhart#4075 at be2dc1a over its merge base 3661a42, as one commit: the branch's merge commits hold changes of their own.
State.waits added mtp.max_rows, the pending-row log's 48 rows, while open, the window buffers and windowRows take mtp.bufferRows(): 32 with TF_FLASHNEXT_WINDOW_CHECK unset. A request near a page boundary could then post and wait for a page its open never uses, so the off path was not main's. The prediction now adds windowRows; an off and paged host test pins the page it posts, none off and page 16 when the check runs.
…switches) The new switch is registered but the Flash Next settings test still expected 38 settings with 26 switches, so the host test failed. Test only.
973503d to
d7f5d83
Compare
|
Thank you @BadAd84. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Terms used below: "main" is upstream TensorFold at
3661a4281425a71eb5f2a56922f0f2a33e5f4f17(the tip of 2026-11-20T06:52:12Z, read from the repository; the branch merges exactly that tip, so it carries main with nothing behind it), and "the branch" is that main plus the one change this pull request adds, whose head is the commit named below.What this changes
Before, a verify window on Flash Next CUDA carries at most 32 rows, so a lone stream's copy window ramps to at most 31 copied tokens a round whatever the machine's rows actually do. After, with
TF_FLASHNEXT_WINDOW_CHECK=1(default off) a load measures, before it serves, the widest verify window whose every row's scores equal the scores of a one-token step on that machine, and the copy window grows to that width, past the 32 rows served without the switch and at most the 48 rows a window's pending-row log holds. A check that cannot run, fails, or proves nothing past 32 rows leaves the window at 32, so no width past the shipped one is served unproved. With the switch off every buffer the window sizes is main's too, so the off state is exactly main.Why a check rather than a constant: whether a 40- or 48-row window's rows equal their one-token steps is a property of the kernels and the driver on that machine, not of the model, and a change that moves a chunk position can take it away. The width is therefore measured at every boot that turns the switch on, and the check's log line names both the rows it compared and the width it serves.
The 48 is not a tuning choice: a drafted window's rows are its stream's pending-row log, which holds 48 rows and is where a partly kept window's rows stay for the next window's chain. A window wider than that would overwrite its own kept rows, so the widest window is the log's own capacity, and nothing wider is measured or served.
3661a4281425a71eb5f2a56922f0f2a33e5f4f17. The change isc14485f5ca8c13a13898abb3a87fe25a769122e0on the older main077998f7d(against that base 23 files, 385 insertions and 110 deletions), the receipt commitc590daeb1adds the four files underdocs/receipts/flashnext-copy-window/(502 insertions), five signed merges of upstream main (6f1e0d994fore7ff97e13,f8af44d1bfor32c4e3d8f,a13efbe9dford8b947b1f,da430818ffor144964f8dandbe2dc1a57for3661a4281) bring the branch to its head, andd8c4dd5a8updates that receipt's boot cells after main's page-cache change, so the head isbe2dc1a5730f42a755b5be7f5caa3108249baa82: 26 files, 883 insertions and 110 deletions against3661a4281425a71eb5f2a56922f0f2a33e5f4f17.CHANGELOG.mdis main's file entire: the changelog line is the maintainer's to add with the number.atc overlap --json, on this head with the base57c792ae5eb6795451e93e15056325983f6aea04(upstream main's tip when it ran): completefalse(limitationsotherPullRequestsLimit,pullFilesUnavailable,pullRequestsLimit,timeLimit), 26 changed files, 38 entries, and four of them conflict. GLM on CUDA: kept states, carries and prompt twins under the latent split (TF_GLM_KV_SPLIT, #1431 part 4; stacked on #2937) #2938 (556ceba53) shares 4 files and conflicts in 1,zig/src/native/cuda_kv_pool.zig: its@hasDecl(F, "window_rows")rows line and this change'sbudget.windowRows(F)replace the same statement, one block, and a read-only merge of that head with main alone is clean. cuda: GLM, MiniMax and Nemotron placed from one launch, by flags or aliases (T1b of #2560) #2919 (0be7321f0) and fabric/mesh: one launch description, --tp up to 64 and the rank aliases (T1a of #2560) #2917 (1bc743645) share 4 files each and conflict only inzig/tests/fixtures/gradient-serving.tsv, the three rows both changes re-pin (cuda_lanes.zig,cuda_lanes_admission_test.zigandcuda_lanes_load.zig), one block each, and each head is clean against main alone. moss image: serve pictures on CUDA (encoder, decoder and host for #1573) #2281 (bcefb2fa4) shares only the pin file, and its four conflicted files (CHANGELOG.md,zig/tests/cuda/contract_limits.zig,zig/tests/cuda/main.zigand the pin file) are exactly the ones it conflicts in with main alone, block for block, so its conflict is its own. Six further entries are clean over their shared files and twenty-eight more were not checked within atc's limits; among those, Ling-3.1-flash on CUDA, on one or two GB10s #2340 (69c3e065f) conflicts with main itself indocs/environment.md,zig/src/platform/environment.zigandzig/src/platform/environment_test.zigplus the pin file, and a read-only merge of its head with this one conflicts in the same three, so it needs its own refresh first. Main has moved since the run: its tip is now6fc30cf0bf3b(changelog: #2917 under Unreleased, 10 commits on, which is fabric/mesh: one launch description, --tp up to 64 and the rank aliases (T1a of #2560) #2917 landed), and a read-only merge of this head into it conflicts inzig/tests/fixtures/gradient-serving.tsvalone, one block over the three rows that change and this one both re-pin (cuda_lanes.zig,cuda_lanes_admission_test.zigandcuda_lanes_load.zig); their code merges without a conflict, and the resolution is those three rows re-hashed to the blobs the merge writes, the same re-pin every merge of this branch has taken.How the width reaches the code:
cuda_mtp.zigkeepsmax_rows, which isbatch.late_rows(48, the pending-row log),base_rows = 32(what main serves),buffer_rowsandserved_rows.bufferWidthdecides the rows a load's window buffers hold:max_rowsonly when the boot check runs, elsebase_rows;sizeWindowwrites it once at load, before the check's own draft.servedWidthdecides the widthserveWindowwrites: with the switch off, or the check not run or failed,base_rows; a proved run widens to it, never past the buffers' rows and never belowbase_rows.rowsOk(n),n >= 1 and n <= served_rows, is the one bound, andprobeWidthsproduces the sweep's widths, every width the buffers hold, under the window they need.cuda_lanes_load.zigreads the switch throughplatform/environment.zig, sizes the buffers (sizeWindow) with the check's own condition (drafts on, the head loaded, TP=1: the pending-row log a check needs is a one-GPU path), runsprobeServedonly then, and sets the window for the load either way, so a reload cannot inherit another load's width; both widths are process state, and every load writes them. A stream's window there, and its cache's rows past the reply incuda_lanes.zig, takebufferRows()rows.cuda_mtp_draft.zigsizes a draft fromDraft.Layout.of, which takesbufferRows()once: a window's scores, its best values (bestBytes, with the candidates atvalsAtand their columns atcolsAt), the saved projection and n-gram rows and the host rows all follow the layout'srows, andcuda_mtp_draw.zigandcuda_draft_draw.zigfind the candidates through the same layout, so a buffer and the offsets into it can never disagree.cuda_kv_lanes.zigholdswindowRows()rows past a request's pages, andcuda_lanes.zigexports it; the native KV pool plans a family's pages withwindowRows, one helper innative/cuda_memory.zigthat takes a family's ownwindowRows()before itswindow_rowsconstant, so every other family plans as before.cuda_lanes.zigreports the served width as the model'sexact_width;core/lanes/config.zigturns that intomax_copy = width - 1andfirst_copy = min(max_copy, first_copy_rows - 1), and the backend refuses a window wider than it.windows.zigreadscopy_width orelse first_copyonly whene.alone, andengine.zigramps it2 * width + 1capped atmax_copyafter a fully kept copy round. Shared rounds keepfirst_copy, 16 rows, unchanged.cuda_mtp_ops.zigrefuses a verify of more rows than the window throughrowsOk, the same predicateverifyManyuses, so a lane core asking for more stops rather than being verified at a width nothing proved.probeServedtakes its widths fromprobeWidths, which setsserved_rowsto the buffers' rows before the firstverify, so the same guard that refuses an unproved width accepts every width the sweep asks for. The load'sserveWindow(check, proved)then sets the width it proved, orbase_rowswhen the sweep failed. Without that ordering the sweep's 33rd width meets a 32-row window and the check can never widen anything.Main changed the page pool under this change too, and the two compose.
95a872500gives the pool's arena one thread that maps its 256 MiB pieces ahead of the caller, and27d834ca0makes a new paged stream, beside streams already running, post the pieces its run and pages reach and skip its round until they are mapped (cuda_kv_lanes.zig'sPool.waitsandmeet, and one line at the top ofcuda_lanes.zig'sprefillStepFn);19e069811is a blank line and a pin row. Nothing in the arena is shaped by a row count: its pieces are fixed 256 MiB, mapped by byte offset and tracked one flag each, and the rows reach it only through its length, the plan's page count, whose window iswindow + windowRows()innative/cuda_kv_pool.zig; a check-on load's arena is therefore at most one page per stream longer than a check-off one, and the pages a stream's run and prompt reach are the ones the pool hands both sides. The one row-shaped input main adds is the capPool.waitspredicts an open needs,rows + mtp.max_rowsinState.waits:mtp.max_rowsis the pending-row log's 48 rows, the widest window any load can hold, so the prediction is never narrower than the open's ownbufferRows()cap, equal to it with the check on and 16 rows wider with it off, where it can only post a page the open will not read this round and never miss one it will. The pin file is therefore the only place the two meet, and it is re-pinned per merge.Every file, and why it changes:
zig/src/families/flashnext/cuda_mtp.zig: the four widths (max_rows,base_rows,buffer_rows,served_rows), the policy that sets them (bufferWidth,sizeWindow,servedWidth,serveWindow,rowsOk,probeWidths) and their host tests.zig/src/families/flashnext/cuda_mtp_draft.zig: a draft's buffers andDraft.bytessized at its layout's rows;bestBytes,valsAtandcolsAtown the best buffer's layout; the byte pins at both sizes.zig/src/families/flashnext/cuda_mtp_draw.zig,zig/src/families/flashnext/cuda_draft_draw.zig: the candidates' and columns' offsets read from the draft's layout, the same functions that size the buffer.zig/src/families/flashnext/cuda_mtp_nonfinite_fixture.zig: the recording device's draft carries a layout, and its addresses come from the same offsets.zig/src/families/flashnext/cuda_lanes_load.zig: the switch read, the buffers sized before the check, the check, the served width, and a stream's window atbufferRows()past the context.zig/src/families/flashnext/cuda_lanes.zig: the served width asexact_widthand the verify guard, a stream's cache rows past its reply, andwindowRowsexported for the native pool.zig/src/families/flashnext/cuda_kv_lanes.zig: the KV pages past a request holdwindowRows()rows.zig/src/families/flashnext/cuda_mtp_ops.zig:verifyandverifyManyrefuse throughrowsOk.zig/src/families/flashnext/cuda_mtp_check.zig: the boot check (windowCheck,probeServed), its bound at its draft's rows, and the drafted check's caches atbufferRows().zig/src/native/cuda_memory.zig,zig/src/native/cuda_kv_pool.zig,zig/src/native/cuda_cache_capacity_test.zig: onewindowRowshelper for the pool's four reads of a family's rows, and its test.zig/src/platform/environment.zig,zig/src/platform/environment_test.zig,zig/src/platform/environment_flashnext_test.zig,docs/environment.md: the switch's rule, its valid values and the table's counts.zig/tests/cuda/contract_flashnext_late.zig: the late-log kernels' served shapes reach the log's 48 rows.zig/src/families/flashnext/cuda_lanes_admission_test.zig: a drafted stream's cache holds the window's rows past its reply.zig/build/cuda_fault_host.zig: thetest-flashnext-window-hoststep and its four filters.zig/tests/fixtures/gradient-serving.tsv: the edited serving sources re-pinned.docs/optimization-ledger.md: the copy-drafts cell.CHANGELOG.mdis not part of this change: it is main's file entire, and the Unreleased bullet is the maintainer's to add with the number.Why a wider window cannot change the tokens, from the code: a copy window's rows are the pending token and the copied tokens, verified in one forward (
cuda_lanes.zigverifyFnbuildsrow_ids = [pending, copies...], and a lone stream takesOps.verify), each row's scores landing inDraft.logitsrow by row; the lane core then commits a path in which each kept row's target sample equals that row's proposal (accept.acceptPath), and the committed token isaccept.targetPick, the target's own pick and never the proposal. A reply is therefore a run of target samples at successive positions, and a copied or drafted token only decides how many rows are proposed and which can be kept. That makes a width exact or not exactly when each row's scores are the ones a one-token step produces at that position, and that is what the check measures: it builds a greedy continuation from a synthetic 96-token prompt, takes every row's one-token step scores as the reference, then for every width from 1 to 48 resets the sequence, re-runs the same prompt, checks the first drawn token is the same, runs one window of that width over the same continuation, and compares each downloaded row with its reference byte for byte over the whole u16 vocabulary row.probeServedlogs the count and the first differing width and returns the largest width whose every row matched. A window of width W at most the proved width thus gives the same scores, the same target samples and the same accepted path as the 32-row arm for the same prefix; what changes is tokens a round, not tokens. The draw is keyed by the row's scores, the token map and the position (cuda_mtp.drawRowtolanes.sampling.choose(..., position, ...)), never by a running generator.No GPU kernel is new or changed. A 48-row window runs the same row-by-row DeltaNet path a 32-row window runs today (
late.frontandlate.chainwhen the window keeps a rollback), and the fused path, which needs 64 or more rows, is still not reached by any window. The kernel contract of those two late-log kernels (zig/tests/cuda/contract_flashnext_late.zig) now serves the log's 48 rows as well as 1, 9 and 32, so its gates run the widest window against the kernels they replace.The cost, only for a load whose check runs: its draft buffers hold 48 rows instead of 32.
Draft.bytesat a 65,536-token window and 1,536-row chunks goes from 356,905,472 to 384,170,752 bytes at the model's full heads and from 280,191,488 to 297,964,288 at half (+26.0 MiB and +16.9 MiB), the saved rows from 41,021,440 and 20,930,560 to 60,334,080 and 30,750,720 bytes, and a stream's window and its KV pages carry 16 rows more. With the switch off, at TP=2 or without drafts, every draft buffer,Draft.bytes, a stream's window and the pool line are main's; two tests incuda_mtp_draft.zigpin both sizes, and one asserts the off state's rows are 32. The check itself costs boot time, which the receipt measures.Checks on this head
be2dc1a5730f42a755b5be7f5caa3108249baa82(tree9f61f509f636dc44d2059522b414e6d3ba16ff7a), a merge ofda430818f7a4and main3661a4281425: the change commitc14485f5ca8c13a13898abb3a87fe25a769122e0, its receipt commitc590daeb1, five signed merges of upstream main (6f1e0d994mergese7ff97e13,f8af44d1bmerges32c4e3d8f,a13efbe9dmergesd8b947b1f,da430818fmerges144964f8dandbe2dc1a57merges3661a4281), andd8c4dd5a8re-takes the receipt's boot cells. Author and committer are the same public identity and every commit is signed (%G?=G),git diff --check 3661a4281425a71eb5f2a56922f0f2a33e5f4f17..be2dc1a5730f42a755b5be7f5caa3108249baa82is clean, and against3661a4281425a71eb5f2a56922f0f2a33e5f4f17the head is 26 files, 883 insertions and 110 deletions, of which 4 files and 500 insertions are the receipt. The merge itself brings main in with 393 files, 62,533 insertions and 649 deletions against its first parent, and every file of it but the three it resolves by hand is git's own three-way merge of the two parents:git merge-tree --write-tree da430818f7a4 3661a4281425gives a tree that differs from the committed one indocs/environment.md,zig/src/platform/environment_flashnext_test.zigandzig/src/platform/environment_test.zigalone (3 files, 5 insertions and 20 deletions), each resolved by keeping both sides' content and recounting the table to 34 settings.python3 tools/zig/lean_check.pywas run in each tree from its own root with that tree's own copy of the checker, and each run logs the root it scanned (the base tree and the head tree), so neither read the other's files: main3661a42816,967 files and 168 problems, this head 6,967 files and 168 problems;python3 tools/zig/lean_new.pygiveslean: 168 problems, 168 on the base, 0 new. The counts match because this change adds no file the checker scans: its added files are the four receipt documents, Markdown and CSV.python3 tools/pr_check.py --base 3661a4281425 --pr 4075on this head:merge base 3661a4281425a71eb5f2a56922f0f2a33e5f4f17; 26 changed files; lean 168 vs 168, 0 new, 0 errors and 1 advisory warning, the warning being that noCHANGELOG.mdbullet names this pull request, which is the maintainer's line to add.zig/tests/fixtures/gradient-serving.tsvpin checked against its file on the merged headbe2dc1a57:files 169 failing 0. Main's rows arrive untouched beside this change's: the seven rows this change edits (cuda_lanes.zig,cuda_lanes_admission_test.zig,cuda_lanes_load.zig,cuda_mtp.zig,cuda_mtp_check.zig,cuda_mtp_draft.zigandcuda_mtp_ops.zig) carry the merged files' hashes, each recomputed from the tree this head commits, and this merge re-pinned nothing by hand because the rows do not overlap: the 19 rows main brings are its own files and none of them is one of the seven.-j4 --maxrss 6000000000, umask 022, no GPU and no checkpoint, onezig buildat a time, the heavy steps under a host-wide lock), on a freshgit archivetree of the merged headbe2dc1a57and of main3661a4281, each checked blob by blob against its commit (verify_tree.py: 12,571 and 12,567 entries, 0 mismatches, 0 extra files):tools/zig/cuda_common_check.pycuda common: 55 local copies, 0 violations;tools/zig/cuda_fragment_check.pycuda fragments: 2 fragments, 15 includes, 0 misses;tools/zig/cuda_common_check_test.pyRan 9 teststhenOK;tools/test_pdl_early_loads.py -vRan 17 tests in 0.009sthenOK;zig fmt --check build.zig zigrc 0 with no output in either tree;test-environment-hostrc 0,3/3 steps succeeded; 27/27 tests passed, 145 s, the step that holds the Flash Next count test, now 34 settings, 23 switches, 9 integers, 1 real and 1 structured, as the merged table anddocs/environment.mdboth state;test-gradient-serving test-qwen-serving-hostrc 0,7/7 steps succeeded; 3/3 tests passed, 8 s;compile-config-server -Dtarget=aarch64-linux-gnurc 0,8/8 steps succeeded, 440 s, andcompile-cuda-tests -Dtarget=aarch64-linux-gnurc 0,10/10 steps succeeded, 208 s, both cross-compiled from the x86_64 machine for aarch64-linux-gnu, so each is a type and link check and no aarch64 host ran it;test-flashnext-window-hostrc 0,4/4 steps succeeded; 27/27 tests passed, 1 s, which is this change's own step.test-flashnext-window-hostnow filtersthe served copy window widens,the boot check's sweep,a draft at 65,536 tokensandthe saved pieces follow. The draft tests pin both sizes: with the switch off a layout's rows are 32 andDraft.bytesis 356,905,472 and 280,191,488 (main's), with the check running 384,170,752 and 297,964,288; the saved bytes and the stream-plus-draft total are pinned the same way. The window tests assert that no proved width is served past the buffers' rows, and that a sweep over 32-row buffers asks only widths those buffers hold.cuda_cache_capacity_test.zigasserts the KV pool planswindow + windowRows()for a family that declares it,window + window_rowsfor one that does not, andwindowalone without either.da430818f: this change's own step on a fresh copy of that head, one mutant applied at a time with its anchor asserted once, and an unmutated control first. Control rc 0,4/4 steps succeeded; 27/27 tests passed; then every mutant fails:base64rc 1, 23 of 27 tests (the served-window test, the sweep test and the two draft-byte tests);max64rc 1, 24 of 27 (the served-window test and the two draft-byte tests);off-serves-provedrc 1, 26 of 27 (the served-window test);failed-serves-maxrc 1, 25 of 27 (the served-window and sweep tests);floor-droppedrc 1, 26 of 27 (the served-window test);probe-serves-baserc 1, 26 of 27 (the sweep test);draft-ignores-switchrc 1, 25 of 27 (the two draft-byte tests). Seven of seven killed, on the tests this change adds. This merge did not re-run them: the two files they edit,cuda_mtp.zigandcuda_mtp_draft.zig, are byte-identical atda430818f7a4and at this head (blobs0987dd7f39f0and2a8d1f8ffb2a), so no byte a mutant perturbs changed, and the same step on this head's own tree passes27/27(above).be2dc1a5730f42a755b5be7f5caa3108249baa82(this head), run on this pull request:fmt,zig,zig-b,zig-windows,pytest,benchmark-clients(ubuntu),release-pathsandzig-macos-dev-toolscompleted successfully;benchmark-clientson windows failed intest_bench_served_evidence.ConcurrentEvidenceTests.test_a_healthy_server_proves_both,AssertionError: 'vacuous' unexpectedly found in {'equal': 2, 'unequal': 0, 'failed': 0, 'vacuous': '1 of 1 reps had no two streams decoding at once'}, a timing-dependent client test intools/tests/test_bench_served_evidence.py, a file this change does not touch; the same job passed on CUDA: an int4 W4A16 kernel for GPTQ group-128 routed experts and the LM head #4183 and Flash Next on CUDA: one pooled n-gram gather for every row a shared pass needs #4009 on the same day, and it cannot be rerun from here, there being no admin rights on the repository.host-nightly-linuxandhost-nightly-macosare skipped by their own conditions.exact_width); TP=2 was not run (the probe never runs there, so its buffers and its served width arebase_rowsand its behaviour is main's).Receipt
077998f7d9b14adebec3a2acc2caa47ff7ae6ec7against the branch atc14485f5ca8c13a13898abb3a87fe25a769122e0, three arms (main, branch withTF_FLASHNEXT_WINDOW_CHECKunset, branch withTF_FLASHNEXT_WINDOW_CHECK=1), 20 boots on one GB10, every cell on a fresh server and fresh images. The switch's boot check printed1176 of 1176 rows byte-equal to their one-token steps (widths 1-48)followed byserving 48-row copy windows after the self-checkon every B1 boot, so a lone stream's copy window ramps to 47 copied tokens a round against 31 on main. With the switch unset the branch's startup pool line reads main's (4.11 GiB a stream at 131072/4 and 1.29 GiB a stream at 32768/8), so the off path allocates main's buffers; with it on the line reads 1.32 GiB a stream at 32768/8. Copy cells, tokens a round: main 23.273, switch unset 23.273, switch on 28.444. Boot wall, re-taken on this head against maind8b947b1fafter the load-time page-cache change: M 37.03 s, B0 37.05 s, B1 49.14 s, so the check costs about +12.09 s a boot (largest boot-to-boot spread within an arm: 0.1 s; the B1 delta is larger than that spread). The decode, prompt and exactness cells are the earlier window's, whose source files are byte-identical on this head apart from main's three edited files; the copy cells and the six golden prompts were re-taken here, copy tokens a round read 23.273 on main and on the switch-unset arm and 28.444 on the switch-on arm, in both cases, and the golden replies equal on every request. The late-log kernels' contract, at the window's own 48-row shape and before the first timed boot:(filtered) SUMMARY 2 kernels: 2 pass gates 1-4, 0 fail, 0 known findings; 0 controls: 0 red as planted, 0 missed; 0 limit problems; gates 113 ms, limits 0 ms(kernel-contract rc 0). The tables aredocs/receipts/flashnext-copy-window/. The measurement pair sits behind this head by main's own 900 commits, 908 commits from077998f7dto the head. Eight of the window's sources are byte-identical betweenc14485f5and this head:cuda_mtp.zig,cuda_mtp_check.zig,cuda_mtp_draft.zig,cuda_mtp_ops.zig,cuda_mtp_draw.zig,cuda_draft_draw.zig,native/cuda_kv_pool.zigand the late-log contract. Four files main edited arrive with its own changes:cuda_lanes_load.zig(the page-cache sweep after load),native/cuda_memory.zig(the WSL2 pool rule and its Windows host-memory read) andcore/lanes/config.zigandcore/lanes/engine.zig(lane-core copy pricing, which does not run on a Flash Next serve, below). The retake re-measured the served copy cells on this head and they read as the receipt records. The lane-core work main did add does not run on a Flash Next serve:#2870's cut-chance pricing is reached only withallocate_shared_draftsset (Flash Next's own model leaves it off),#3617carries message starts nothing reads yet, and the warm-turn field is Qwen3.5's. So the widths, the pool line, the boot cost and the exactness argument describe the merged head; the absolute decode, prompt and exactness numbers are the ones those 20 boots recorded on main077998f7d.c590daeb1(cuda_mtp.zig,cuda_mtp_check.zig,cuda_mtp_draft.zig,cuda_mtp_ops.zig,cuda_mtp_draw.zig,cuda_draft_draw.zig,cuda_mtp_nonfinite_fixture.zig,cuda_lanes_admission_test.zig,native/cuda_kv_pool.zig,native/cuda_cache_capacity_test.zigand the late-log contract) and 11 carry main's edits beside this change's lines. Of the change's 368 added lines, 357 are present verbatim; the 11 that are not are three settings-count lines main re-counts itself (one on the environment page and two in the Flash Next count test, its name and its literal), theCHANGELOG.mdbullet the branch does not carry, and the seven pin rows re-hashed per merge. The served files main edited arecuda_lanes.zig(itskept_viewrename, theiofield and the first-step wait),cuda_kv_lanes.zig(the arena'sio,Pool.waitsandmapAhead's post) andcuda_lanes_load.zig(the post-load sweep and theiohanded to the pool);native/cuda_memory.zigcarries main's WSL2 pool rule and its Windows host-memory read (524ceded7), and the rest are main's rows and pins beside the change's own (cuda_fault_host.zig,environment.zig,environment_test.zig,environment_flashnext_test.zig,gradient-serving.tsv,optimization-ledger.md).TF_FLASHNEXT_WINDOW_CHECK: exactly0or1, default0; unset or blank is off, and any other text stops the start by name,TF_FLASHNEXT_WINDOW_CHECK="2": expected 0 or 1 (1 runs the boot copy-window self-check; default 0). Its rule is inplatform/environment.zigwith the otherTF_FLASHNEXT_*rows and its row is indocs/environment.md. Not in a profile, and nogetenvoutside the environment table reads it.c14485f5ca8c13a13898abb3a87fe25a769122e0on main077998f7d9b14adebec3a2acc2caa47ff7ae6ec7, Zig 0.17.0, CUDA 13.3, host 7.0.0-1019-nvidia-64k; Ubuntu 24.04.5 LTS; NVIDIA GB10, 580.178.04, [N/A]; RAM 123 GiB. Checkpointnvidia/Qwen3.8-Flash-Next-FP4-Local, revisionb9ce18a6887e18c089fdea8509a33e63429a3300, every arm; both images built from verifiedgit archivetrees of their own commits, kernels embedded (sha256:2703ee4cc38561184062f1189a4b400096976aa571d6dee70fb2a93681cf1bbd,sha256:d74a3f583f6474d8856a552bd1c7d341e318c166ca118a25c0172ce2be95c679), each carrying that window's own compile (itsSOURCEline is in the build summary). The boot retake built its own pair the same way (sha256:7df98dcf49dd2dd5943f6bf5ad3a2143a2472c855057aa79d612062a00b8836eandsha256:0d57e8596e67827cae8ac8821eceb5953f07bc8ee21fadba083e777d760350b5), each with its ownSOURCEline. The host checks above ran the merged headbe2dc1a5730f42a755b5be7f5caa3108249baa82and main3661a4281425a71eb5f2a56922f0f2a33e5f4f17, each on a freshgit archivetree, with Zig 0.17.0 on x86_64, no GPU and no checkpoint.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: concurrent equals solo, drafted equals"draft": falseand resumed equals fresh on every arm, cache on and cache off; the tallies read 13/0, 24/0, 56/0, 156/0 and 7 of 7, 8 of 8, greedy token hashes 528 equal and 0 unequal, drafts off 42 equal and 0 unequal: no unequal pair anywhere. The code argument is above; the check is the gate, and a machine that fails it serves 32 rows, which is main's behaviour.docs/receipts/flashnext-copy-window/and the arm logs behind them; nothing is asked of your machines before it exists.tools/bench_openai.py: level within the noise rule at 1, 2, 4, 6 and 8 streams. B0 against main 0 faster, 14 level, 0 slower; B1 against main 2 faster, 12 level, 0 slower; B1 against B0 2 faster, 12 level, 0 slower over the pass A cells. Copy cells decode tok/s 246.8 to 296.2 across the arms, the table indocs/receipts/flashnext-copy-window/.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.--drafter, no slower than without it, greedy and sampled.The inference block is closed from the receipt above, except its last line: the receipt measures decode and prompt processing against main (level at every cell under the noise rule) and the off path's buffers against main's, but it does not measure
--drafteragainst without it, so that comparison is not claimed and the line stays unticked.