Repository navigation
Conversation
95d2292 to
95c9452
Compare
|
Besides the token equality in #1432 and #1433:
|
0269c7b to
277929c
Compare
|
All five are in the refreshed head
|
|
Thanks @akol1: all five earlier points are in. Rank 1's refusal comes before any backend call and has a test. The watchdog fails closed.
This also needs #1432's rebase. |
ec2dc03 to
03d0de3
Compare
|
Refreshed and force-pushed:
Gates on |
|
Thanks @akol1. Both are in on |
4c14ed9 to
c7dcbce
Compare
|
Thanks — both are in, and they did not move under the rebases. On the current head
Fresh receipts on The commits above this one add the tp-check option, the oracle tooling and the docs; the four files behind the cap and the refusals are unchanged except for step 5's |
c7dcbce to
5d2db8e
Compare
|
Rebased onto the current
The rebase also moved this commit's refusal words into one small module, This room is one Mac now: the second Mac the pair receipts were recorded on is gone (the cluster was broken), so a fresh two-Mac |
|
Thanks @akol1. All the earlier points are in, and the one-Mac path looks unchanged: with no link the refusals do nothing, the chunk cap and the cache, rewind and learn wiring stay as on main, and moving the window timing into
Once those are in, this lands in order after #1432 and #1433. |
5d2db8e to
ebb337d
Compare
|
Rebased onto Both review points are in:
Numbers from this head, run here, not carried over: The paths that need two Macs are not re-run here: the second Mac the pair receipts were recorded on is gone. The host test pins the resume rule on one Mac, and step 4's loopback gate compares the pair against the single Mac byte for byte. |
|
Thanks @akol1. Everything from our earlier review is answered, and nothing changes on a single Mac: every new branch needs
To fix it:
Until then, the changelog line and the description shouldn't say |
ebb337d to
6febdc2
Compare
|
Both parts of the
Numbers from this head, run here, not carried over: Two Macs are still not re-run: the second Mac the pair receipts were recorded on is gone, so the two-Mac |
6febdc2 to
6db850c
Compare
|
Thanks @akol1. The One more change before this lands, on the single-Mac path:
Everything else from our earlier reviews is still in place after the rebase, and this applies cleanly on current |
… compileHost (a Step.Options is not a Module; CI's zig build --help gate caught it)
…TF_Q27_DFLASH_ADAPTIVE_BLOCK rides the wire-free host path)
…eam pick rides qwen27_pair.zig, the adaptive-block env read lives with its rule)
…max trio rides qwen27_keep.zig, the seam wiring and refusal words ride the pair modules, the pair env test lives beside its file)
…the pair's trace settings table rides its own test file)
…-form row per pair env in environment_test's table (the extra parses and the refusal live in environment_pair_test.zig, imported from environment.zig)
…in core/owned.zig, and checkpoint_identity joins the root module once)
…, the seam opens and closes through the pair modules so the host stays under the lean cap, slots and served re-pinned with provenance)
…t (Linux's full-cache host unit must not compile the Metal encode path through it)
… the dflash trace's computed reads and the confidential deny-list names join the lookup table (the env-names gate)
…ed; no repo changes) -- 2.54.0 (Apple Git-157)
…and wider deny-list prefixes made stale (the env-names gate)
…l so the host stays under the lean cap (post-rebase lean/fmt follow-up)
…ld_options (the pair fingerprint hashes the engine version)
…conflicting; no repo changes)
…the trace ledger rides pair_rows_trace.zig, the layout's region and parity tests ride pair_rows_layout.zig)
… (the serving-pin gate)
…e trace reads the host timebase, the drafter refusal words tighten, and the whole-head re-preparation names itself on out-of-memory (review round)
…eat word, the trace checks the timebase call, the startup pin binds the wrapper to its guard, and the timing flag names its readers (review round)
…l fact, the trace pins its conversion to the host timer, the argmax walk exposes its tile law, and the environment pin refreshes with the rebased file (review round)
Synthena Initial Review — Needs changes (
|
…h_timebase_info failure retries (review round)
|
Rebased onto [BLOCKER] cached timebase fallback — fair catch, fixed: the failure path now returns 24_000 without writing [WARNING] the source-pinned startup test — it is already scoped the way the suggestion words it: the pins are exactly the #1434 invariant (wrapper born inside [WARNING] eager fullHead — the premise doesn't hold on this head: [WARNING] the chunk sent before the local pass — the round outcome does converge, by three layers rather than an unwind path in Local bundle on this head: pair-start 3/3, served-host green on the rebased tree (23/23), gradient-serving 6/6 with the refreshed pins, fmt clean, lean 0 new, merges clean. The |
Synthena Initial Review — Needs changes (
|
What this changes
Step 3 of 6 of the two-Mac Qwen3.8-27B series, rebased onto current
main(d51acefea), which already carries steps 1-2 (#1432 and #1433 are merged). Step 4 stacks on this commit. The branch now also carries the whole speed campaign on top of the serving steps: the mlp row split at one seam a layer (129 exchanges a token), the ready fingerprint, the kernel-spinner option, draft rounds riding the wire (.tree/.commit), the drafter bound to the target's global geometry, the whole-head re-preparation that lets--drafterserve on a pair, the follower-before-ready startup order, symmetric measure rounds with no link commands, the plain/draft replay dispatch, the trace-interval override and thedraft_headphase split. On two M4 Pro Minis this build serves the 128-token greedy fixture at 23.5-25.4 tok/s versus 6.6-7.4 plain and 12.5-13.9 solo, byte-exact (f5c9409cfe40) on every leg.The serving path learns the pair.
qwen27_pair.zigis the transport's types and the seam ABI the engine calls, with the window one exchange may carry:seamBytes(rows) = rows * 8,704 * 2,chunk(requested) = min(requested, batch_rows),batch_rows = 128, and a host test that pinsseamBytes(chunk(promptRows())) <= pairBytes()andseamBytes(512) > pairBytes()— the served pass asks for 512 rows on tensor units, and only the cap keeps its widest seam (this rank's half of the 17,408-column activated frame) inside the window.qwen27_link.zigis the link's liveness: rank 1 replays rank 0's four GPU operations a pair round is made of (begin,chunk,step,end), and both ranks stop when the link dies instead of one serving alone. The watchdog and rank 1's follower are the two threads ofqwen27_link.Workers;closesets theirquitand joins both, so neither outlives the pair it watched.qwen27_slots.zigunderstands that both ranks hold the frame: a slot's opening, fill, step and close announce the link'sbegin,chunk,stepandend(glm_dsa's order), so both ranks stage the same round; the window timing staysmain'sqwen27_costs.zig, unchanged.zig/build/qwen27_host.zigadds thetest-qwen27-served-hoststep andbuild.zigmakes it part ofzig build test, so the refusals' words are pinned on a CPU alone. A pair never resumes a slot in place: rank 1 resets the slot at each round'sbegin(link.follow), soattachpasses the switchMetal.initread throughlb.slotResume(init, pair), which keepsTF_QWEN27_SLOT_RESUME=0off on one Mac and turns resume off for a pair (lb.resumesInPlace), or the ranks would part at the resumed offset; the host test pins that composition on both paths.A pair refuses what it cannot keep, by name, before the backend moves any round state: rank 1 answers "speed-up mode: this Mac runs rank 0's requests; send requests to rank 0" (
FollowsPeer), a sampled or grammar request is refused at the head ofprefillFninqwen27_lanes.zig(the check ispair_mod.refuseSampling, which lives inqwen27_pair.zigso the lane host stays inside the 600-line rule) with "speed-up mode: a pair answers greedy only; send the request with sampling and grammar off" (PairGreedyOnly) rather than being answered greedily for one token and failing on the next,--visionwith a message that starts "--vision does not run on a pair" (PairNoVision), a second stream ("--speed-up serves one greedy stream: pass --parallel 1",PairOneStream), a drafter, read from the flag the user passes rather than from the loaded object (PairNoDrafter), a prompt cache or--learn(PairNoCache,PairNoLearn), and a watchdog that would not start (PairNoWatchdog, so a half cannot keep serving after its peer dies) — all named in one place,qwen27_pair_flags.zig;qwen27_pair.zig'srefuseSamplingandrefuseFollowercall them from the head ofprefillFn, andqwen27_served.zigcallspair_flags.refuseOptions, theqwen27_pair_flags.zigadapter fromOptionsto those words, before the backend moves any round state. For the drafter that adapter runs inopen— beforePair.init, the shard or the vision tower loads — and inattach's first statement, before the loaded drafter is read; the host test buildsOptions{ .pair, .drafter }and hands it to the same helper, with a bound drafter as its second case, so a refusal that ever stops firing turns that test red.qwen27_pair_tests.zigis imported byqwen27_served.ziginto the CPU-onlytest-qwen27-served-hoststep, so these words are pinned without shaders or a GPU; the tests leave theMetalandStreamfields undefined except the ones the guard reads, which proves the refusal happens before any other step.A rank's verify never runs a tail.
forward.zig'sfinishruns the head seam first and hands the reopened encoder back to the tail (zig/src/families/qwen27/forward.zig:230-238,:241); when the seam ishead == .noneit is skipped and the tail still runs, which is the one-Mac path. Because the head writes only this rank's vocabulary columns while the tail's matcher reads the whole row,decode_round.zig:221refuses a round that has both witherror.TailOnRankbefore the cache checks or any GPU work;zig/qwen27_bank_boundary_host.zig:53pins that refusal with model-free stubs, and from step 3 on a pair refuses--drafterat the front door, so the two never meet.Receipt
22bdee72ef3acf5fb4d8047ec97f7a3d7a41d31c) onmain(e764c78b2d357043a19894ae2d3f763f4837e01a) plus steps 1-2, which are merged inmain; no MLX or PyTorch; macOS 27.2 on an Apple M4 Max (Mac16,5), Metal only (apple-m4GPU family, no tensor units), Apple metal version 32023.921. The host refusals and the window arithmetic need no checkpoint; the point where this commit needs weights (a served pair) is not exercised here: step 4's gate runs two rank-local shards over the seam's loopback link on one Mac, and step 5's oracle is the two-Mac acceptance.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: n/a at this commit — it adds the serving pair but no model gate; the exactness evidence it makes possible is step 4'stf-qwen27-tp-check(per-token shas against the single Mac) and step 5'spair_accept.pyoracle. Nothing here changes a sum: the chunk cap can only lower a request's row count to the window's 128 rows.tools/bench_openai.py: n/a at this commit; the pair's decode rate on two Macs is step 4's and step 5's receipt, and a loopback figure would be one Mac's.--chunkgate pins the bound). The cap is a correctness bound on the exchange, not a throughput claim. The series-level cold-prefill A/B was recorded on the earlier tree and is not re-run at this commit; a pair's prefill is capped by construction rather than measured here.zig build test:623/623 steps succeeded; 9721/9777 tests passed (56 skipped)(run here with a cold local cache, so these are the counts of the whole suite; every step succeeded), exit 0. The CPU-only pair tests are in that run: rank 1's refusal, the sampled and grammar refusal with the exact words, the chunk-times-seam window test, the--visionrefusal and the--drafterwiring test that passesOptionswith.drafterset through the same helperopencalls. A third test pinsslotResume: a pair refuses in-place resume at either rank, a single Mac keeps the switchMetal.initread, andTF_QWEN27_SLOT_RESUME=0stays off, so a refusal that put the user's switch back on turns it red.zig build test-kernel-contract:22/22 steps succeeded; 164/164 tests passed, exit 0.zig build dev-tools:224/224 steps succeeded.zig build test-qwen27-served-host:7/7 steps succeeded; 48/49 tests passed (1 skipped), exit 0; the CPU-only pair tests it runs are the ones above.zig build tf-qwen27-tp-check:error: no such step: tf-qwen27-tp-check, exit 1 at this commit (step 4 adds it).zig fmt --check build.zig zig: clean. Filtered contract runs:--only pairprintsSUMMARY 15 kernels: 15 pass gates 1-4, 0 fail, 0 known findings; 36 controls: 36 red as planted, 0 missed; 0 limit problemsand exits 0;--only simdprintsSUMMARY 4 kernels: 4 pass gates 1-4, 0 fail, 0 known findings; 0 controls: 0 red as planted, 0 missed; 0 limit problemsand exits 0 (each line continues with that run's gate and limit times, omitted here because they move with cache state). Lean rule:lean: 424 problems, 424 on the base, 0 new(tools/zig/lean_new.py, exit 0). (These counts were recorded on the pre-rebase base (755db15ad); after the replant ontoe764c78b2, the stack's head rerun reports649/649 steps succeeded; 10139/10208 tests passed (69 skipped), every step succeeded.)aegress over this link (upstream'sdocs/speed-up-mode.md§5 documents the sameConnectFailed); the fresh receipt is the comment on this PR). The model gates (tf-qwen27-tp-checkarrives in step 4), the unfiltered kernel corpus (UNSUPPORTED metal moss image), CUDA, HIP/RDNA, M1-M3, M5 and Windows are not in this room.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. — a pair refuses--drafterfrom the flag the user passes, before the loaded object and refuses sampling/grammar, so there is no drafted pair output to compare; the one-Mac equality gates aremain's and steps 4-5 add the pair's.SUMMARYline is in the receipt. — this commit adds no GPU kernel; it drives the four pair launches that core: add the row-split pair seam and split simd_qmm over K #1432 put onmainand the family's existing kernels. The filtered contract runs in the receipt are the regression check for the kernels it talks to.apple-m4GPU family); the host-only tests need no GPU; no CUDA, HIP, M1-M3, M5 or Windows.qwen27_pair_tests.zig, noPairGreedyOnly, nopairChunk; those tests fail to build there, and they skip nothing because they run on CPU alone.tools/zig/lean_check.pyreports no problem in the files this commit touches.Stacked on:
main(e764c78b2), which carries steps 1-2. This commit is step 3 of 6.