Skip to content

glm cuda: TF_GLM_COPY_SHARE=1 lets shared rounds' copies take the lone ramp, to a stream's share of the rows - #3333

Open
Bizuayeu wants to merge 2 commits into
ashhart:mainfrom
Bizuayeu:pr/glm-copy-share
Open

Bizuayeu wants to merge 2 commits into
ashhart:mainfrom
Bizuayeu:pr/glm-copy-share

Conversation

@Bizuayeu

@Bizuayeu Bizuayeu commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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+1 after 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=1 lets 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 without TF_GLM_COPIES=1, so the default and TF_GLM_COPIES=1 alone keep their facts.

Cell, decode tok/s (aggregate) TF_GLM_COPIES=1 + TF_GLM_COPY_SHARE=1
a quoted document (~400 tokens back), 1 stream 131.6, 132.2 132.1, 132.2 within
quote, 2 streams 76.5, 77.5 114.6, 116.6 +50.1%
quote, 4 streams 95.7, 96.5 124.0, 124.8 +29.4%
a file edited back, 1 stream 113.4, 113.5 113.4, 113.5 within
edit, 2 streams 70.4, 70.3 109.0, 108.9 +54.9%
edit, 4 streams 79.4, 78.7 99.2, 99.1 +25.4%
prose, 4 streams 56.6, 56.2 55.8, 55.8 −1.1%
code, 4 streams 71.7, 71.5 71.4, 70.5 −0.9%

These 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:

Set the copying stream, tok/s the others as run, tok/s the others' round gap while it decodes
a quote + three prose (4 streams) 27.9 → 46.4 15.8 → 16.5 138.5 → 155.8 ms (+12.5%)
an edit + three code (4 streams) 22.0 → 35.8 18.6 → 18.8 177.4 → 195.9 ms (+10.4%)
a quote + one prose (2 streams) 45.2 → 98.9 25.8 → 28.8 85.4 → 147.1 ms (+72.2%)

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's token_sha256 was 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.

Tests:

  • New in 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".
  • New in families/glm/cuda_env_test.zig: "TF_GLM_COPY_SHARE=1 widens TF_GLM_COPIES=1's copies and is refused without them".
  • New in 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".
  • Red: the lane core's four, on a tree with the fact's field and the tests but not the ramp, fail the two that grow ("expected 8, found 4") and pass the two that pin today's widths; with the share cap removed, only the cap test fails (copied <= 2 * (32 / 4 - 1)). On a copy of this head where GLM's apply never sets the fact, test-glm-copies-host fails exactly the two native copy tests (18/20).

Checks on this head

  • Head commit: b33bb29f36, the CHANGELOG number on the change 375b5ccd1e. The WSL checks below ran on 375b5ccd1e, whose code this head keeps; the GB10 build and the receipts are from b33bb29f36.
  • Lean checker, 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.
  • Tests run, with the command and pass, fail and skip counts: WSL (x86_64, Zig 0.17.0), zig build -Dfixed-cpu STEP: test-environment-host 23/23, test-shared-lane-regressions-host 371/372 (1 skipped), test-root-copy-host 48/48, test-glm-copies-host 20/20, compile-cuda-tests 10/10 steps, and test-cuda-host 6,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 -rs from the root: 459 passed, 86 skipped, 519 subtests passed; main's CI on the same base has 461 and 84, the two apart being tools/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 base 4ddc28cfc8: the binaries of the receipts.
  • CI on this head: fmt, zig, zig-windows, zig-macos-dev-tools, pytest, benchmark-clients (ubuntu-latest and windows-latest) and release-paths passed; host-nightly-linux and host-nightly-macos were skipped.
  • Not run, and why: Metal, HIP, Vulkan and XPU, with no such machine here; only GLM's CUDA lanes set the fact. The receipts are TP=2 and greedy only.

Receipt

  • Main against branch: the table below, the base 4ddc28cfc8 against this head, built and launched the same way.
  • Boxes it reaches: CUDA boxes serving GLM with TF_GLM_COPIES=1 and TF_GLM_COPY_SHARE=1, at two streams or more. These numbers: two GB10s at TP=2.
  • New switch? TF_GLM_COPY_SHARE: unset or 0 keeps the facts (the default), 1 turns it on; it is refused at GLM's open without TF_GLM_COPIES=1, and any other text is refused by name. Its rows are in platform/environment.zig and docs/environment.md, with a paragraph in docs/recipes/cuda-lane-copies.md.
  • Environment: this head and its base, built on a GB10 as above; two GB10s at TP=2 with --parallel 4; Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4 at 0a22bb46ec; greedy, 256 tokens, 3 reps; tools/bench_concurrent.py --alone --serial on the lists below, tools/bench_openai.py and tools/bench_cache.py; every launch fresh, one after another, in two windows (the second for the default path's launches d and e).
  • Paths and platforms the change reaches, which I ran and which I could not: GLM's CUDA lanes, where apply sets the fact and the core's copy proposal reads it in shared rounds. Ran TP=2 only.
  • Exactness: above.
  • Main against this branch, same machine and checkpoint: below.
  • Decode speed before and after: the tables above and below (tools/bench_concurrent.py, and tools/bench_openai.py's two prompts).
  • Prompt speed before and after: n/a. The fact sizes copy drafts in decode rounds; prompt passes propose no copies.
  • Licence of any new weights or drafter: n/a.

The default path: the base 4ddc28cfc8 against this head

Neither 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.

List, streams, decode tok/s base a to e head a to e head / base word
quote, 1 123.3, 123.1, 121.7, 122.0, 123.1 123.2, 122.5, 123.1, 123.7, 123.3 +0.4% within
quote, 4, a stream 25.3, 25.3, 25.4, 25.2, 25.3 25.4, 25.5, 25.4, 25.3, 25.4 +0.4% within
quote, 4, aggregate 97.0, 96.5, 96.8, 96.4, 96.3 97.0, 97.6, 96.3, 96.0, 96.5 +0.1% within
code, 1 46.8, 45.2, 46.8, 47.1, 45.1 47.1, 45.9, 44.5, 47.2, 47.5 +0.5% within
code, 4, a stream 19.6, 19.6, 19.3, 19.1, 19.4 19.2, 19.6, 19.4, 19.4, 19.3 −0.1% within
code, 4, aggregate 72.5, 73.0, 72.1, 71.1, 72.2 72.7, 73.1, 72.3, 71.8, 71.9 +0.2% within
code1, 1 46.4, 44.2, 44.2, 45.6, 46.3 46.4, 44.9, 46.0, 44.6, 45.6 +0.4% within
code1, 4, a stream 29.8, 29.6, 29.8, 29.6, 29.4 29.6, 29.8, 29.6, 29.8, 29.7 +0.2% within
code1, 4, aggregate 116.9, 116.7, 116.8, 115.2, 115.5 116.1, 116.7, 115.5, 116.0, 115.6 −0.2% within
edit, 1 103.5, 101.2, 102.9, 103.5, 100.7 102.3, 102.7, 100.8, 102.6, 102.9 −0.1% within
edit, 4, a stream 22.8, 22.8, 22.6, 22.6, 23.0 23.0, 23.1, 22.8, 22.6, 22.6 +0.3% within
edit, 4, aggregate 78.2, 77.6, 78.1, 77.4, 79.2 79.2, 80.4, 78.2, 76.2, 75.6 −0.2% within
prose, 1 37.6, 38.0, 38.0, 38.2, 37.7 37.9, 37.6, 36.7, 38.7, 38.0 −0.3% within
prose, 4, a stream 14.3, 14.3, 14.6, 14.2, 14.4 14.4, 14.5, 14.5, 14.6, 14.4 +0.8% within
prose, 4, aggregate 52.6, 53.1, 53.0, 52.2, 53.2 53.0, 53.5, 52.6, 53.0, 52.8 +0.3% within
lprose, 1 35.4, 35.8, 35.5, 35.3, 34.9 36.0, 35.7, 34.9, 34.7, 34.3 −0.7% within
lprose, 4, a stream 12.8, 12.6, 12.8, 12.5, 12.7 12.8, 12.8, 12.8, 12.9, 12.7 +0.9% within
lprose, 4, aggregate 45.3, 44.2, 45.7, 44.1, 45.4 45.0, 45.6, 45.5, 45.6, 45.4 +1.1% within
l64prose, 1 34.7, 35.0, 34.3, 34.8, 35.1 34.3, 33.5, 34.2, 35.0, 34.8 −1.2% within
l64prose, 4, a stream 13.3, 13.7, 13.7, 13.3, 13.4 13.4, 13.3, 13.3, 13.4, 13.2 −1.2% within
l64prose, 4, aggregate 48.9, 48.6, 49.0, 48.1, 48.9 48.9, 49.1, 47.6, 47.6, 47.7 −1.1% within
bench_openai.py fibonacci-raw, 1 46.6, 45.5, 44.0, 44.5, 46.1 46.2, 45.8, 45.8, 44.7, 44.7 +0.2% within
bench_openai.py gpu-chat-no-think, 1 37.6, 37.8, 37.2, 37.0, 37.8 38.0, 38.0, 38.0, 37.1, 37.9 +0.9% within

The figures are bench_concurrent.py's per-stream and aggregate decode tok/s (one number at one stream), and bench_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 in tools/ 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 of zig/src that 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

  • 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. (The red runs above. None needs a GPU, a checkpoint or the process environment, so none skips.)
  • 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. (The fact only widens a copy window the lanes already verify.)
  • Drafted output equals "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.)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (No arithmetic changes; the tokens are the same.)
  • Decode and prompt processing are no slower than main at one stream and the widest admitted; with --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.)

@ashhart

ashhart commented Nov 14, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena (Ash's Agent)

@Bizuayeu

Copy link
Copy Markdown
Contributor Author

We will run the device check on our side at TP=2 [...]. Tokens must match plain decoding before we compare complete round costs and served speed.

#3333 (comment)

Thanks. The description now carries receipts from this head (b33bb29f36), two GB10s at TP=2, greedy: the tables for copies with the share off and on, and a table for the default path against the base 4ddc28cfc8. In all fourteen launches, every reply matched its request run alone and serially with "draft": false. On the default path, five launches each over two windows, no row is slower than the base by the rule written before the first window; the lowest is l64prose at −1.1% to −1.2%, and the description also gives the first window's words, when two rows were slower.

One note for landing: main (2ba55ec7d3, Release 1.2.9) has no Unreleased heading, so a test merge of this branch puts its CHANGELOG line under ## 1.2.9, which has already shipped. I can rebase and move the line under the next Unreleased once that section exists, or you can move it at landing, whichever suits the queue.

@Bizuayeu
Bizuayeu marked this pull request as ready for review November 15, 2026 01:11
@ashhart

ashhart commented Nov 16, 2026

Copy link
Copy Markdown
Owner

@Bizuayeu, we applied the series to main and read the resolution order end to end: the share only arms under
TF_GLM_COPIES=1, the cap keeps the other streams' rows open, and the refusal without the copies flag is named.
We ran the GLM copy and shared-lane host suites and both are green, including the four new
lane tests, the environment test and the two native copy tests.

Your default-path receipt is what makes this landable: the base against your head, five fresh launches a row
over two windows, and all twenty-three rows within the rule you wrote before the first window - no cell slower.
With the share on, the costs you state (prose and code aggregates a little lower at four streams, the copying
stream's neighbours' rounds longer while it decodes) live on the opt-in path, under a flag that itself sits
behind TF_GLM_COPIES=1, so the rule that a default may not make any measured cell slower is met.

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
bench on our GB10 pair - the quote, edit, prose and code lists at one, two and four streams with the copies flag
and then the share added - and check every reply's token hash against its alone and serial runs, with the
default path's rows inside your ranges.

  • Synthena (Ash's Agent)

@ashhart

ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

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 TF_GLM_COPY_SHARE unset, copyProposal passes the same width as before (sharedWidth returns it unchanged), and the ramp in engine.zig only moves under the flag. So the default and TF_GLM_COPIES=1 alone behave as before, and TF_GLM_COPY_SHARE=1 without TF_GLM_COPIES=1 is refused by name when the model opens. Your receipts cover the served side: the default path against the base, 23 rows within your rule, and every reply equal to its alone and "draft": false run.

One note: glm/cuda_lanes.zig is already at 600 lines on main and stays there with this change, so a later edit there will need something moved out first. Nothing to change in this PR.

Before landing we still need a device check of the share at two and four streams. Nothing more is needed from you for it.

  • Synthena

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@Bizuayeu

Copy link
Copy Markdown
Contributor Author

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.

#3333 (comment)

Since then this branch conflicts with main, in docs/environment.md only. 7948cc42d3 and 85048e5e43 rewrote the TF_GLM_PDL row (now "GLM's kernels and its qmmf linears use dependent launches"), and this branch adds its TF_GLM_COPY_SHARE row directly above that row. In a test merge with git merge-tree against main (dffe424859), the other files both sides changed (CHANGELOG.md and eight Zig files) merge on their own; no code file conflicts, and the merged glm/cuda_lanes.zig is 599 lines.

The resolution is main's file with the TF_GLM_COPY_SHARE row added above the TF_GLM_PDL row, one line. I can rebase the branch onto main with that, or you can resolve it at landing with the changelog line, whichever suits the queue.

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

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 docs/environment.md row, and it is ours: we will rebase it so main's rewritten TF_GLM_PDL text stays and TF_GLM_COPY_SHARE is added above it, keep your authorship, place the changelog line at landing and run the two- and four-stream check on our side before it lands. Nothing further is needed from you.

  • Synthena

…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.
@AIFlowML

Copy link
Copy Markdown
Contributor

I checked ec4642bc against 124052c97. It now trial-merges cleanly, including docs/environment.md. On M5 Max with Zig 0.17.0, zig build test-environment-host test-shared-lane-regressions-host test-root-copy-host test-glm-copies-host -Dcpu=apple_m1 -j5 --summary all passed 549 tests with one skip on the head and 554 with one skip on the merge. That exercises the shared ramp, the four-row fallback and retaining plain tokens in the recording lane. The two- and four-stream checkpoint check is still a device run.

Igor Lessio - AIFLOW LABS

@Bizuayeu

Copy link
Copy Markdown
Contributor Author

The two- and four-stream checkpoint check is still a device run.

#3333 (comment)

If it helps the queue, I can run that check on ec4642bc on two GB10s at TP=2, built and launched as in the description's receipt: the default path, and TF_GLM_COPIES=1 with the share off and on, at two and four streams, with each item's token_sha256 compared across the launches and the tokens a second beside them. I would post the results here. If you are running it on your side as planned, there is nothing for me to do, and I will leave it with you.

@Bizuayeu

Copy link
Copy Markdown
Contributor Author

The two- and four-stream checkpoint check is still a device run.

#3333 (comment)

I ran that check on ec4642bc on two GB10s at TP=2, built and launched as in the description's receipt. Every reply matched its request run alone and serially with "draft": false, and each item's token_sha256 was one hash across the default path, TF_GLM_COPIES=1, and TF_GLM_COPIES=1 with TF_GLM_COPY_SHARE=1. The share engaged at two and four streams.

Setup. The native was built from ec4642bc with an empty Zig global cache, in the same image as the description's receipts (Zig 0.17.0, nvcc 13.3, sm 121). The checkpoint was Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4 at 0a22bb46ec, with the same TP=2 settings as before (context 1048576, parallel 4, greedy). There was one table launch, then three fresh launches, one for each path, all on the description's B lists: quote and edit at 1, 2 and 4 streams; prose and code at 4; the three mixed lists; and bench_cache.py. All three launches read the same kept window prices. The windows line now reads experts factored; the description's receipts read classic. No heat wait or heat-cap change fell inside any launch.

Exactness.

  • Bench items: 0 failures over 17 items, each compared across all three launches.
  • Quote load: 8 of 8 replies gave their document back in every launch, and the timed items' replies matched the bench's alone run.
  • bench_cache.py: qualified in all three launches. The repeats reused the cache, every row's tokens equalled the first request's, and the first reply's token_sha256 was the same in all three.

The share engaged (pooled tokens a chunk, TF_GLM_COPIES=1 → with the share):

list 2 streams 4 streams
quote 3.765 → 9.432 3.733 → 6.469
edit 3.850 → 10.894 3.879 → 7.262

Tokens a second (per-stream median / aggregate; one launch a path, so these are readings, not a speed verdict):

list × streams default TF_GLM_COPIES=1 with the share
quote ×1 124.5 / 124.5 132.7 / 132.7 132.7 / 132.7
quote ×2 40.2 / 78.4 40.0 / 77.3 65.0 / 113.9
quote ×4 25.8 / 98.2 25.8 / 96.7 33.0 / 123.3
edit ×1 104.0 / 104.0 115.0 / 115.0 115.2 / 115.2
edit ×2 37.9 / 70.8 37.8 / 71.2 63.2 / 109.8
edit ×4 23.1 / 78.4 23.1 / 79.6 30.6 / 101.4
prose ×4 14.7 / 53.8 14.9 / 55.2 15.4 / 55.2
code ×4 19.6 / 72.8 20.0 / 70.1 18.6 / 72.2

In the mixed lists (request 0 copies, the others decode), the copying request was faster with the share on:

list TF_GLM_COPIES=1 with the share
mix4q 37.7 tok/s 57.3 tok/s
mix4e 27.4 tok/s 41.2 tok/s
mix2q 47.0 tok/s 105.2 tok/s

Its neighbours' median chunk gap was longer while it decoded:

list TF_GLM_COPIES=1 with the share
mix4q 100 ms 129 ms
mix4e 143 ms 163 ms
mix2q 84 ms 142 ms

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants