Repository navigation
qwen3_5 cuda: readout streams fill in pieces of final-norm rows (#2324 step 2) - #2384
Conversation
|
Thanks @laudney. Step 2 reads clean:
One small thing: please end the CHANGELOG line "(#2384, part of #2324). Thanks to @laudney." This lands after #2383. |
c993c19 to
c4b8fa8
Compare
|
Rebased onto main |
A Clef request reads every prompt row through its joint schema head, so the CUDA Qwen3.5 lanes now take readout streams: each prefill step runs one piece from row 0 (no prefix store or kept states) as a rows forward and hands its final-norm rows to the attached readout, release closes the state after the stream drains, and readout_finish reaches the readout through the CUDA host. A piece is the lane host's cap or 1,024 rows, as on HIP. tf-qwen35-cuda readout checks the rows on the GB10: four together, a cancel and a failed consume match one alone byte for byte.
The second step of ashhart#2324 gives the CUDA Qwen3.5 lanes readout streams; the Unreleased notes say how a readout prompt is filled and how large a piece is.
The review asked the line to end with the PR number, the issue it is part of and the thanks, as other lines under Unreleased do; the text of the change itself stays the same.
c4b8fa8 to
404f1c5
Compare
|
Thank you @laudney. 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. |
Every PR merged since v1.2.4 now has exactly one line under Unreleased: duplicate lines from stacked and train-merged PRs are removed (#2280, #2384, #2532, #2548, #2170, #2506, #2304, #2241), keeping the fuller line; #2280's and #2344's lines carry their own numbers; #2176 names the #1335 it carries; and the finders of #2515's and #2463's problems and #2526's reporter are thanked by handle. The 1.2.4 section is unchanged.
|
Thanks @laudney! This is in TensorFold 1.2.5, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.5 |
Stream.readout)prefill_step; each piece's final-norm rows go to the attached readout on the engine streammax_rowswhen above 0, else 1,024 (HIP's piece); no new settingreadout_finishnative/cuda_bound.zigforwards itconsumeWhat this changes
Plan step 2 of #2324: the CUDA Qwen3.5 lane backend takes readout streams, as HIP does since #2047. A readout prompt fills from row 0 (no prefix store, kept states or reuse marks) through
prefill_steppieces inforward(.rows)(from #2383), and the readout consumes each piece's rows;readout_finishreturns its logits. No readout is attached in production until the joint schema head lands (plan step 3), so every served path keeps its old vtable./v1/systemone, step 4 the GB10 gates 1-6).16e044d94(qwen3_5 cuda: a plain BF16 checkpoint loads as a decision backbone, chat refused by name (#2324 step 1) #2383 is merged). Commits:02a3eb644(readouts),8edb68823(CHANGELOG line citing Clef-Flash on native CUDA: /v1/systemone through the joint schema head (GB10) #2324) andc4b8fa84d(review: the line ends with the PR and thanks). Rebased from the qwen3_5 cuda: a plain BF16 checkpoint loads as a decision backbone, chat refused by name (#2324 step 1) #2383 stack with one force-push; the code diff is the same as before the rebase, and the CHANGELOG line now sits under Unreleased above 1.2.4.atc overlap --json(pr-clef-cuda-2, 2026-11-07 12:00 UTC; incomplete:pullFilesLimit,pullFilesUnavailable,timeLimit): conflicts with docs: the end-token pair for replies that quote a template marker #2437, GLM on CUDA: the latent split's per-rank page book and owner (TF_GLM_KV_SPLIT, #1431 part 1; stacked on #1411) #2415, GLM-5.3-Flash on CUDA keeps conversation states on disk, every rank's part (--learn-conversations) #1411, simd_qmm on Metal: half operands where every input of a tile fits half, with the fp32 tiles' bits (#2089) #2435, Qwen3.8-27B on Metal: a prompt pass that keeps no row writes only its last layer's keys and values #2436, kv ledger: the prepaid stream is a standing lease, so the ledger admits the window plan's streams (#1943 step 2) #2434, DeepSeek-V4.1-Flash on Metal: the EXL3 2.9 bpw lane #2373, core: one walk for kept prompt states, GLM on it (CUDA and Metal) #2215 and gemma4, nemotron cuda: a prompt chunk nothing reads stops at its last state write #2432, each inCHANGELOG.mdonly (checked against each PR's file list). Open PRs that touch this PR's code files (glm cuda: a chat's next turn can resume at the previous turn's history (opt-in, #2396) #2404, qwen3_5 cuda: a chat's next turn can resume at the previous turn's history (opt-in) #2176, qwen35: dense BF16 loading and native prompt logprobs #2020, fix(cuda): allocate Qwen3.5 scratch at load #1879, qwen3_5 cuda: a chat's next turn resumes at the previous turn's history (message starts for the planned cache) #1335, qwen3_5 cuda: the 27B as a pipeline stage, logits byte-equal to the whole model #2115, CUDA on GB10: Qwen's integrated weight upload reserves its pinned slot once, with load and device-weight receipts #2356, Ling-3.1-flash on CUDA, on one or two GB10s #2340), merged bygit merge-treewith this head and with main: this PR adds a conflict only to qwen35: dense BF16 loading and native prompt logprobs #2020 (cuda_native.zig; it conflicts with main in 4 files) and qwen3_5 cuda: the 27B as a pipeline stage, logits byte-equal to the whole model #2115 (zig/build/cuda.zig; 11 files with main). The others conflict with this head only where they already conflict with main.core/lanes/change: the readout code is in the CUDA Qwen3.5 lane backend (cuda_readout.zig,cuda_native.zig), plus thereadout_finishforward in the CUDA host wrapper (native/cuda_bound.zig) and one build import for the runner. No Clef code is ported; THIRD_PARTY_NOTICES is unchanged.Checks on this head
c4b8fa84d.16e044d94and on this head: 116 and 116, 0 new (all inherited).tf-qwen35-cuda <clef-flash> readout <3,000 ids> 4on the GB10, built fromc4b8fa84d(zig build qwen35-cuda: 118/118 steps):PASS 1 vs 4 together with a text prompt between their pieces, after a cancel and a failed consume: 3000 rows in 3 pieces of 1024, byte-identical (wyhash a526ba2c6c9099b9); each state closed once, exit 0. It fails if the planted consume failure does not fire, if the text stream did not run between pieces, or if a state closes more or less than once.zig build test test-goldenonc4b8fa84d(host, Linux x86_64): 587/590 steps, 7372/7433 passed, 60 skipped, 1 failed:cuda_disk_test"kept states written to disk read back byte-equal after a restart" (expected 2, found 0), the same intermittent failure as on the earlier head, in a file this PR does not touch; the same binary and seed0xc96998e7pass 5 of 5 runs alone (150 passed, 2 skipped; includes thecuda_boundtest thatreadout_finishis forwarded).zig fmt --check build.zig zigandgit diff --check: pass.c4b8fa84d: 7 of 7 checks pass (fmt, zig, zig-windows, zig-macos-dev-tools, release-paths, benchmark-clients on Linux and Windows).Receipt
Environment: base
16e044d94, headc4b8fa84d(the readout runner ran this head; the 27B rows ran on base0d7152955with the build noted under the table); Zig 0.17.0; CUDA 13.4; NVIDIA GB10 (sm_121, 128 GB shared memory, Linux aarch64); checkpoints Cloudflare/clef-flashfb4417d31c1d0f9e7e77f1141b40aaede7491e00and TensorFold/Qwen3.8-27B-MLX-4bit22d8d538154e0e5b6f8dcb1fcc74a60a0798104c.Paths and platforms: readout streams only take the new path, and only when a readout is attached; text streams keep
prefill.run,prefill_stepand the text vtable. Ran: GB10.Exactness,
tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0 --levels 1,4 --alone --serial, 27B, runs on base0d7152955in the order main, qwen3_5 cuda: a plain BF16 checkpoint loads as a decision backbone, chat refused by name (#2324 step 1) #2383, this PR, this PR, qwen3_5 cuda: a plain BF16 checkpoint loads as a decision backbone, chat refused by name (#2324 step 1) #2383, main: every cell's concurrent, alone and serialtoken_sha256agree within each run and across all six runs (code2b28aa2108de…, chata06fab348fbe…).Main against this branch (27B,
--prompt-cache-gib 0 --context 70000):bench_openaidecode median, fibonacci-raw / gpu-chat-no-thinkbench_cache --require-cold32kttft_sThe 27B runs used a build of this PR before one change: it still read an unset
TF_QWEN_READOUT_ROWSonce at open, a setting this head removes with no other change to the text path.Licence of new weights: n/a.
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.--drafter, no slower than without it, greedy and sampled: 1 and 4 streams measured (8 admitted, not run); no drafter run, because no text path changes