Repository navigation
Conversation
|
DEVICE @Bizuayeu, no must-fix found. The option stays off by default, requires copies to be enabled, and keeps the existing target verification and row allocator. The new tests cover the shared ramp, miss reset and plain-token equality for both drafter modes. Host checks and Linux cross-compiles pass: 6,985 tests passed, 43 skipped, with formatting clean and zero new lean findings. We will run the device check on our side at TP=2: copies off and on, greedy and seeded, one through eight streams, MTP and DFlash2, including rejected copies and resumed turns. Tokens must match plain decoding before we compare complete round costs and served speed.
|
Thanks. The description now carries receipts from this head ( One note for landing: main ( |
|
@Bizuayeu, we applied the series to main and read the resolution order end to end: the share only arms under Your default-path receipt is what makes this landable: the base against your head, five fresh launches a row Nothing to change from us. The CHANGELOG line's conflict with main's Unreleased section is ours to resolve at landing. On our side we will run the same
|
|
Thanks @Bizuayeu. We re-read the change against current main. It still merges cleanly there, apart from the CHANGELOG line, which we place at landing. With One note: Before landing we still need a device check of the share at two and four streams. Nothing more is needed from you for it.
|
|
Thanks @Bizuayeu. The flag remains off by default, its refusal and shared-row cap are in place, and the three-way merge is clean. No further author changes are requested. The two- and four-stream device check remains before landing; we will place the changelog line under Unreleased at landing.
|
Since then this branch conflicts with main, in The resolution is main's file with the |
|
Thank you @Bizuayeu for checking the merge against current main. Nothing is left to change in the code: the flag stays off by default, the refusal and row cap are in place, and no further author changes were requested. The only item is the
|
…e ramp, to a stream's share of the rows In a shared round every copy window was first_copy wide (three tokens for GLM): the lone ramp (2w+1 after a copy kept whole, back to first_copy after a miss) ran for a stream alone only. With TF_GLM_COPIES=1, a quote or an edit at two or four streams drafted no more a round than one stream's first copy. Model.shared_copy_ramp lets a family's shared rounds take the ramp too, each copy capped at its stream's share of batch_rows less its pending row (32 rows: 15 tokens at two streams, 7 at four, first_copy from seven on), so a copy cannot take the rows the other streams' windows need. The cap keeps rows open; whether the allocator fills them is the prices' (TF_GLM_COPIES=1 prices every shared row). It needs shared rounds: with TF_GLM_SHARED=0 each stream's copy keeps first_copy, and Recall keeps its width. GLM sets the fact only with TF_GLM_COPIES=1 and TF_GLM_COPY_SHARE=1, so the defaults and TF_GLM_COPIES=1 alone keep their facts; TF_GLM_COPY_SHARE=1 without TF_GLM_COPIES=1 is refused at the open, not read as off.
b33bb29 to
ec4642b
Compare
|
I checked Igor Lessio - AIFLOW LABS |
If it helps the queue, I can run that check on |
I ran that check on Setup. The native was built from Exactness.
The share engaged (pooled tokens a chunk,
Tokens a second (per-stream median / aggregate; one launch a path, so these are readings, not a speed verdict):
In the mixed lists (request 0 copies, the others decode), the copying request was faster with the share on:
Its neighbours' median chunk gap was longer while it decoded:
This is the same opt-in cost the description states. Code at four streams with the share was 7% lower per stream than without it, and 3% higher in aggregate. That covers the two- and four-stream device check from my side. I'll leave the landing with you. |
What this changes
With
TF_GLM_COPIES=1, a copy in a shared round is always the first copy's three tokens wide; only a stream alone grows its copies on the lone ramp (2w+1after a copy kept whole, back to three after a miss). So a quote or an edit at two or four streams drafts no more a round than one stream's first copy: 3.9 tokens a chunk on the bench below, against 15.4 for the same quote alone.TF_GLM_COPY_SHARE=1lets shared rounds' copies take the lone ramp too, each capped at its stream's share of the round's 32 rows less its pending row: 15 tokens at two streams, 7 at four, 3 from seven streams on. The cap leaves the other streams' rows open, and the prices still decide what fills them. It is off by default and refused at the open withoutTF_GLM_COPIES=1, so the default andTF_GLM_COPIES=1alone keep their facts.TF_GLM_COPIES=1+ TF_GLM_COPY_SHARE=1These are two fresh launches an arm of this head, placed symmetrically in one window (copies, share, share, copies). At four streams, prose and code are lower with the share: −1.1% and −0.9% aggregate, with both share launches below both copies launches, and −0.3% and −1.3% a stream. One stream never shares a round, and its tokens a chunk are the same in all four launches (15.448 for the quote, 12.800 for the edit).
Where it costs, with one copying stream beside prose or code:
The copying stream finishes sooner, so the others end a little faster as run; while it decodes, their rounds are longer. On an earlier fork build of this change (on main
d001c28f29, with an experiment-only switch for the comparison), a copy without the share cap, taking every row the others leave, raised the totals another 0.4–2.6% and the others' gaps another 14–29%, so the cap stays. Every item'stoken_sha256was one hash over its streams, reps, alone and serial runs and every launch that ran it (25 items over the fourteen launches in this description): the default path on the base and on this head, and this head's copies with the share off and on.TF_GLM_COPIES=1stays opt-in; this adds one more opt-in under it.4ddc28cfc8), two commits: the change (375b5ccd1e) and its CHANGELOG line's number (b33bb29f36, no code change).atc overlap --jsonagainst main4ddc28cfc8: 25 open pull requests share a file with this head before it stops at its limits (complete: false), and it marks qwen35 cuda: fuse the dense MLP's NVFP4 prompt gate and up projections into one launch #2410, glm cuda: TF_GLM_GRAPHS=1 replays verify windows as CUDA graphs (#1490) #2279, dsv41 metal: image prompts #1722, dsv41 metal: the vision tower's kernels under the kernel contract #1721, Unlimited-OCR-2 on native Metal: the publisher's BF16 release, page images to structured text #2074 and deepseek_v41: reply logprobs normalize over all TP head columns (#1324) #2125 as conflicting. Five share onlyCHANGELOG.md. glm cuda: TF_GLM_GRAPHS=1 replays verify windows as CUDA graphs (#1490) #2279 (TF_GLM_GRAPHS) also adds its row afterTF_GLM_SHAREDin the env table, its docs row and the GLM env test, so this head puts its row with the other off-by-default GLM switches, afterTF_GLM_LINK_WAIT; a test merge with glm cuda: TF_GLM_GRAPHS=1 replays verify windows as CUDA graphs (#1490) #2279's head conflicts only inCHANGELOG.md.Tests:
core/lanes/shared_copy_test.zig: "without the ramp a shared round's copy keeps first_copy's four rows", "the ramp grows two streams' copies to their share and starts over after a miss", "eight streams keep four-row copies, and so do streams that share no round", "a copy keeps to its stream's share of the round, leaving the other streams their rows".families/glm/cuda_env_test.zig: "TF_GLM_COPY_SHARE=1 widens TF_GLM_COPIES=1's copies and is refused without them".native/copy_drafts_cuda_test.zig: "GLM's TF_GLM_COPY_SHARE adds only the shared ramp, and nothing without TF_GLM_COPIES", "GLM's shared ramp widens shared rounds' copies past four rows and keeps plain tokens".copied <= 2 * (32 / 4 - 1)). On a copy of this head where GLM'sapplynever sets the fact,test-glm-copies-hostfails exactly the two native copy tests (18/20).Checks on this head
b33bb29f36, the CHANGELOG number on the change375b5ccd1e. The WSL checks below ran on375b5ccd1e, whose code this head keeps; the GB10 build and the receipts are fromb33bb29f36.python3 tools/zig/lean_check.py, on the base and on this head: 341 and 341, the same findings.tools/pr_check.py --base origin/main --pr 3333: 14 changed files, 0 new findings, 0 errors and 0 warnings.zig build -Dfixed-cpu STEP:test-environment-host23/23,test-shared-lane-regressions-host371/372 (1 skipped),test-root-copy-host48/48,test-glm-copies-host20/20,compile-cuda-tests10/10 steps, andtest-cuda-host6,200 passed, 32 skipped and 1 failed on the first run:server/linear_time.zig's timing test "fastest's work leaves out a sleep in a run", which this change does not reach, while the machine was also running other work. Rerun on the quiet machine, all 398 steps passed, that test's binary (52 tests) with them.pytest -q -rsfrom the root: 459 passed, 86 skipped, 519 subtests passed; main's CI on the same base has 461 and 84, the two apart beingtools/zig/test_nfkd_tables.py, which skips on this machine's Python (Unicode 15.0.0). On a GB10 (aarch64),zig build native -Dnvcc=… -Dsm=121(Zig 0.17.0, CUDA 13.3), each from an empty global cache, built this head and its base4ddc28cfc8: the binaries of the receipts.fmt,zig,zig-windows,zig-macos-dev-tools,pytest,benchmark-clients(ubuntu-latest and windows-latest) andrelease-pathspassed;host-nightly-linuxandhost-nightly-macoswere skipped.Receipt
4ddc28cfc8against this head, built and launched the same way.TF_GLM_COPIES=1andTF_GLM_COPY_SHARE=1, at two streams or more. These numbers: two GB10s at TP=2.TF_GLM_COPY_SHARE: unset or0keeps the facts (the default),1turns it on; it is refused at GLM's open withoutTF_GLM_COPIES=1, and any other text is refused by name. Its rows are inplatform/environment.ziganddocs/environment.md, with a paragraph indocs/recipes/cuda-lane-copies.md.--parallel 4;Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4at0a22bb46ec; greedy, 256 tokens, 3 reps;tools/bench_concurrent.py --alone --serialon the lists below,tools/bench_openai.pyandtools/bench_cache.py; every launch fresh, one after another, in two windows (the second for the default path's launches d and e).applysets the fact and the core's copy proposal reads it in shared rounds. Ran TP=2 only.tools/bench_concurrent.py, andtools/bench_openai.py's two prompts).The default path: the base
4ddc28cfc8against this headNeither switch set; five fresh launches each, over two windows: in the first, base, head, (the four launches above), head, base, then base, head; in the second, base, head, head, base. Launch a is each binary's first, b its second and so on, so each pair stands side by side in its window. Each binary timed its window costs on a launch of its own before the first window and kept them: 39.39, 60.38 and 175.32 ms at 1, 4 and 32 rows on the base, 39.22, 60.50 and 175.07 on this head. The second window's launches read the same kept tables.
bench_openai.pyfibonacci-raw, 1bench_openai.pygpu-chat-no-think, 1The figures are
bench_concurrent.py's per-stream and aggregate decode tok/s (one number at one stream), andbench_openai.py's median decode tok/s over its three runs. The lists, built from this repository's files: quote, a document asked back word for word (about 400 tokens); code, eight raw completions; code1,bench_concurrent.py's own code prompt on every stream; edit, a file intools/asked back with its first function renamed; prose, chat prompts that ask for an explanation; lprose and l64prose, prose after about 31K and 63K tokens ofzig/srcthat the reply does not copy.The word is the rule written before the first window: slower when head's mean is below the base's by more than the base's range over its launches and by 0.25% at least, within when it lies between the base's lowest and highest, faster above the highest, and open otherwise (below the lowest, inside that margin). Over the first window's three launches each, 15 rows were within, 4 faster, 2 open and 2 slower: code1 at four streams, aggregate (−0.6%, the base's range 0.2%), and prose at one stream (−1.2%, range 1.1%). The second window was added after those words, under the same rule over all five launches each, and all 23 rows are within. On code1 at four streams, aggregate, the base itself ran lower in the second window (115.2 and 115.5, against 116.7 to 116.9), and its range there is now 1.5% (1.6% on prose at one stream); pair by pair (a with a, and so on), head minus base is −0.8, 0.0, −1.3, +0.8 and +0.1 tok/s there, and +0.3, −0.4, −1.3, +0.5 and +0.3 on prose at one stream. The lowest rows are now l64prose's, −1.2% at one stream and −1.2% a stream and −1.1% aggregate at four, where head's mean sits 0.06, 0.02 and 0.08 tok/s above the base's lowest launch; at one stream, head is below the base in four of the five pairs (−0.4, −1.5, −0.1, +0.2 and −0.3).
At four streams, code1's tokens a chunk was 2.943 in all ten launches, and its median round gap was 97.2 to 97.7 ms on the base and 97.4 to 98.2 ms on this head. On l64prose at four streams, tokens a chunk was 2.343 to 2.349 on both binaries, and head's median round gap is shorter than the base's in four of the five pairs (168.5 to 169.6 ms, against 169.2 to 170.3). At one stream, tokens a chunk move between reps on both binaries (l64prose: 2.065 to 2.265 on the base, 2.065 to 2.306 on this head).
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (In every cell of the fourteen launches, on the default path and with the copies, each reply equals its request alone and serial, the serial run being"draft": false; in every launch,tools/bench_cache.py's requests that reuse the cache return its cold first request's tokens, one reply over the launches.)--drafter, no slower than without it, greedy and sampled. (On the default path, by the rule above, no row is slower over five launches each, at one stream and at four; the lowest, l64prose's at −1.1% to −1.2%, sit 0.02 to 0.08 tok/s above the base's lowest launch. Prompt passes propose no copies. Greedy only; I didn't run--drafter.)