Repository navigation
Conversation
b134588 to
3575cc3
Compare
|
@ashhart #2634 now serves: |
33989ef to
71afe36
Compare
|
@jschmied, M3 Ultra cells on Exact. On every agent request, at T=0 and seeded T=1, the DSpine reply equals the DFlash2 reply and the reply with drafts off. Agent-shaped requests, one stream (decode tok/s):
That's a bigger agent gain than on the GB10. Chat and code (
One stream matches the GB10 picture. Two streams are where Metal differs: the server says "DSpine drafts for 1 stream", against DFlash2's "drafts for 2 streams". The patch drafts slot 0 alone (the Before this lands: could DSpine draft every admitted stream on Metal, as DFlash2 does and as #2633 does on CUDA? If one slot is a deliberate first step, please say so in the body and the CHANGELOG, and refuse or warn at |
|
@ashhart every admitted stream now drafts by default, as DFlash2 and CUDA do: Measured on our M3 Pro (36 GB, no tensor units), 27B MLX 4-bit,
Exact: 32 of 32 comparisons byte-identical. At T=0 (c=1 and c=2), DSpine with either setting and DFlash2 equal plain decode; at T=1 c=2, DSpine equals DFlash2 and the one-stream run. On this GPU a 2-stream pass costs about two 1-stream passes, so drafting both streams is 4-9 % slower than drafting one at c=2, and DFlash2 still leads there. Could you run the 2-stream cells (c=2, agent and chat, T=0 and T=1, Gates on Proposed CHANGELOG line (Unreleased): "- The 27B on Metal: DSpine drafts every admitted stream, as DFlash2 does; |
|
Thanks @jschmied, that's the change we asked for. Every admitted stream now drafts by default A few things before that:
On the 36 GB question: please keep the stock 8 GiB margin here. A Mac without the room should go on refusing DSpine by We'll write the CHANGELOG line when it lands. Main is closed for a release right now, so landing waits until it |
ac97590 to
0349d06
Compare
|
@ashhart thanks, all five done, and it is out of draft. The head is now
36 GB: the stock 8 GiB margin stays, with no new setting. The refusal now names the drafter (0349d06): "--parallel 1 needs 4.3 GiB for its streams and 512-row prompt scratch at a 4096-token context; 3.1 GiB remains beside the weights, the DSpine drafter (2.7 GiB) and an 8 GiB margin: Metal lets this Mac use 28.1 GiB; sudo sysctl iogpu.wired_limit_mb=29958 raises that limit enough for one stream at this context until reboot (or lower --context)". qwen27_served.zig is 595 lines. Gates on 0349d06: test-qwen27 46/46 steps, 191/191 tests; test-qwen27-startup-host 4/4; test-environment-host 13/13; test-environment-report-host 35/35; native 66/66; zig fmt clean; lean 386 vs 386 (0 new); Served exactness on the new code (test-only 4 GiB margin build, uncommitted, |
|
Thanks @jschmied. The rebase is clean on main with only this PR's commits. Two things are left:
We'll write the CHANGELOG line. After that we run the two-stream cells on our M3 and M5 Ultra Macs, and a GB10 check of the commit 11 CUDA loader on this head.
|
|
@ashhart both should be in place now; our update at 13:13 may have crossed with your read:
The GB10 side is also checked on this head: |
|
Thanks @jschmied, both are in. The description matches Nothing more is needed from you. Next we run the two-stream cells on our M3 Ultra and M5 Ultra Macs with
|
, ashhart#2464, ashhart#2375, ashhart#2634) and adds row 29, DSpine (ashhart#2633) Rebased onto main after ashhart#2760's row 28 (Scale index), which stays as on main. DSpine is row 29 with ashhart#2633's final GB10 ranges: agent 2-20 % faster, chat and code 10-19 % slower.
|
On exact head With those two files combined on the PR head, the same command passed 61 freshly run tests, and the unchanged 13-test artifact was reused. The shared suite gained the narrowing test. This verifies the shared-core resolution only. The registry and four remaining serving/drafter files need integration, and I did not run a DSpine checkpoint on this Mac. Igor Lessio - AIFLOW LABS |
The MTP head's device check and load move to qwen27_mtp_flags.zig, unchanged. The Moss image, Moss decoder and DSpine contract suites register in the same order behind one create in metal_image_dspine_suites.zig.
Use explicit blocks for the DFlash2-only optional captures. This preserves the adaptive reset and makes the rebased source pass zig ast-check.
…as DFlash2's - Tree.scores hold path scores (`draft_tree.pathScores` after `grow`), which `local` reads by subtracting the parent's; a child's chance can no longer go above one in a shared round. - A DSpine request takes the stream's draw only through `drawFor`, DFlash2's rule (a lone sampled stream, drafting from where it stands); a shared round's tree keeps the drafter's own scores. - `Model.buffers` adds attention, top-k, the frame pool and the prepared and tiled weights through `appendDraft`; `residency.hold`/`drop` attach and detach DSpine's follow hook (`setDraft`).
61b6349 to
8d60eec
Compare
|
@ashhart the quiet rerun on our M3 Pro shows no loss. The chat c=2 drop I reported was noise from the Mac's load, so it's no reason to hold this from our side. Setup: the same as before.
Aggregate tok/s, clean sessions, mean (min–max):
At chat c=2, every clean B session is at or above every clean A session; they touch at 26.22. No cell is slower on the branch. What explains the earlier −0.6 %: I compared two separate builds of main, A and A'. Their binaries differ (3,060 bytes, same size), so Mac builds of one commit aren't byte-identical. That day the Mac was under load from antivirus, Java and a VM, and only 2 of 20 sessions had no warning. Tonight, with the gate, the difference is gone in both directions. Tokens:
DSpine on B, two sessions from the A-A' day (loaded Mac, so a floor, not a final number):
So the earlier 20.72 came from load, not a change. Tonight's run hit its 06:00 stop before its own DSpine pass. If you want quiet DSpine rows next to these, I'll add them tonight. All measured on |
|
Thanks @jschmied. The overnight A-B-B-A settles the one open cell: with the pressure gate and the excluded-and-rerun sessions, no cell is slower on the branch — agent and chat at c=1 are level to the token, and at c=2 every clean branch session is at or above every clean main session. The three review fixes are in and verified (path scores with the above-1 control, the shared This lands with our review. Our check repeats the served equality rows and the batch-of-two on an M3 Pro-class Mac with the 27B MLX 4-bit checkpoint, DFlash2 and DSpine, and the kernel contract summary. Merge state: your rebase resolved the one conflict in the served file's host setup; main has moved under the PR since (the taps ring and the fused taps in the same files), so the landing rebase is ours.
|
Synthena Initial Review — Performance receipt required (
|
…the bridge fixture is pinned by size and sha256
|
New head Red
[BLOCKER] fixture provenance: fixed. The new host test [WARNING] [WARNING] [WARNING] Receipt: the claims are Metal drafting speed and memory. Conflict with main: ashhart rebases at landing. x86, targeted on |
|
This re-review is on [BLOCKER] fixture provenance: in place since Speed rows: these are Metal rows from our M3 Pro, which is offline. The cells in the body were measured on The |
|
A correction to our automated review: The fixture is already pinned by size and sha256 in host_test.zig and both warnings were answered with file:line; this is a new opt-in drafter (kind:feature, no receipt against main), and the landing rebase and Metal device rows are ours.
|
This head: a04d735 (ashhart's rebase 8d60eec, 0a123ef for review 7372969935, then a comment-only commit)
dflash/generation.zig: the DFlash2 fuser branch isD == Draft. DSpine's own model, which also has agraph, no longer takes it. This fixeszig-macos-dev-tools(tf-qwen27-dspine-run:no field named 'config').dspine/host_test.zig: the bridge fixture is pinned by size and sha256. Planted control: one flipped byte fails the test.a04d73568e: three PR comments over 120 columns shortened, no code change.check-native-cuda-host compile-cuda-tests17/17), and anaarch64-macos -Dcpu=apple_m1cross-build ofdev-tools test-qwen27with 0 source errors (only the link stops, on the macOS SDK frameworks). Our Mac is offline, so this round has no device run. The device rows below are from 61b6349 and 82ae37f.Previous head: 61b6349 (ashhart's eeeaee5 plus one commit for review 7111733774)
Tree.scoresnow hold path scores (draft_tree.pathScoresaftergrow), which is whatlocalreads.drawFor: a lone sampled stream, drafting from where it stands).buffersadds attention, top-k, the frame pool and the prepared and tiled weights (sharedappendDraft), andhold/dropattach its follow hook (sharedsetDraft).test-lone-copy-host(path-score test; planted control: raw own log-chances read as paths give a chance above 1),test-metal-residency-owners-host(new DSpine owners test; planted controls: the oldbuffersleaves 9 allocations out, and with no hook a later frame buffer never joins), the qwen27/DSpine host set,zig fmt --check,git diff --checkandpr_check. The macOS targets compile for aarch64-macos.-Dcpu=apple_m1) on 61b6349,tensorfold-nativemd5aa5c55f70092d232cdee5da6b85d9904: the qwen27/DSpine build and tests 93/93 steps, 360/362 tests (2 skipped); DSpine contract 9 kernels pass, 3 controls red; served T=0 c=1/c=2 DSpine == plain and DFlash2 == plain 12/12, T=1 c=2 seed 7 DSpine == DFlash2 12/12;tf-qwen27-dspine-gatebatch of 2: 30/30 proposals equal to each stream's own pass. Speed rows below were measured on 82ae37f and not rerun.Previous head: 82ae37f, rebased onto main e6094de on the user's request
qwen27_served.zig'sLaneHost.init. Main's.penalties = trueis kept beside DSpine'sd.label(). As in AIFlowML's trial (qwen27 Metal: DSpine drafter for Qwen3.8-27B, opt-in #2634, 7072481473): main's MTP-head KV reserve sits beside DSpine'stapIds().len, the built-in MTP metadata stays, andTF_Q27_DRAFT_SLOTSdescribes both behaviours. Nothing in this PR uses.rotary_dim(metal: drop qwen27 prompt_glue/prompt_state and core tf_lane_rope, which nothing launches (#2251) #3065).qwen27_lanes,qwen27_draws,qwen27_resume,qwen27_slotsandqwen27_servedunder this PR, so the Metal device checks were rerun on this head.Rerun on 82ae37f:
native test-qwen27 test-qwen27-startup-host -Dcpu=apple_m1, 82/82 steps, 217/219 tests. The 2 skips are env-gated MTP tests.tensorfold-nativemd5 is 35cc1c84.--only "qwen27 dspine":SUMMARY 9 kernels: 9 pass gates 1-4, 0 fail, 0 known findings; 3 controls: 3 red as planted, 0 missed; 0 limit problems.zig build test: 965/970 steps. The 3 failing tests (DeepSeek-V4.1 vision config, persistence identity, native memcpy nm step) fail identically on main e6094de, so nothing is new against main.--parallel 2 --context 2048(concurrency 1 and 2), stock 8 GiB margin:tf-qwen27-dspine-gate: a batch of 2 == each stream's own pass 30/30. The one-round gate (6/16, 149/240) is unchanged.test-qwen35-dspine-hostand 15test-qwen27-*-hoststeps among them, plustest-environment-hostandtest-env-defaults-host. 69/69 steps, 890/892 tests (2 skipped).zig fmt --check,git diff --check,pr_check(0 errors, lean 165 vs 165, 0 new).native,test-qwen27,tf-kernel-contract) compile for aarch64-macos (no SDK, so no link) with 0 errors.native test-cuda-host -Dnvcc=/usr/local/cuda/bin/nvcc -Dsm=121, 618/618 steps, 6229/6268 tests (39 skipped).cuda_dspine_weights.zigreads the sharedcore.dspinetable, and main left it unchanged.Carried, not rerun: the kernel-contract full sweep (546 kernels) and every speed row below, all measured on the pre-rebase head before 0445547. The speed claim's code (DSpine runtime, kernels, tree walk) did not change in the rebase. No CHANGELOG commit. Proposed CHANGELOG line:
qwen27 Metal: DSpine drafter for Qwen3.8-27B behind --drafter, opt-in (#2634).Opt-in: nothing changes unless
--drafternames a DSpine folder. On main since #2633 landed; the CUDA DSpine,core.dspineand the shared tree walker it reuses are main's.What this changes
DSpine for Qwen3.8-27B on Metal, served, in its own
qwen27/dspine/(Metal's DFlash2 body is conv-wrapped with its own tap set, so it is not reusable as a body). Reused:shared_attention,draft_ops, the affine-4 prepare,bf16_topk, the target head kernels,core.dspine(config, table walk, the checkpoint's 71-tensor table and TG's head input) andlanes.draft_tree.qwen27/dspine/config+weights: the 27B checkpoint pinned (NotStockDSpineotherwise), its 71 tensors exactly, fromcore.dspine's table (the CUDA loader reads the same table).dspine_mlxrounds.lanes.draft_tree.grow.dflash/generationbecomesGenerationOf(D);qwen27/drafter.zigAny= DFlash2 | DSpine behind one Generation, so lanes/slots/keep/residency go through it.--drafter DIRpicks the kind fromconfig.json(core.dspine.declared); DFlash2 stays the default.draft_slots=draftSlots().TF_Q27_DRAFT_SLOTScaps it for DSpine as for DFlash2. Ring and K/V are sized tomin(8192, capacity + window)rows (exact below 8192: no context wraps), 280 MiB a stream at 4096.draft_treeCandidates (the same keyed-noise path as CUDA).tf_dspine_*kernels are in the Metal kernel contract (zig/tests/contract/metal_qwen27_dspine.zig): served shapes (bridge at 16/32/128 rows, hidden 5120, code 1024, rank 512; senders/base/table at a stream's 15 head rows, K 16) against a float64 host reference, senders bit-exact; three planted controls go red.Checks (M3 Pro 36 GB, no tensor units)
test-qwen27,test-qwen27-startup-host, the environment host tests, native build, fmt, lean (no new problems),pr_check(0 errors).tf-kernel-contractfromzig build,-Dcpu=apple_m1, with this Mac's--rotary-accuracysweep file):SUMMARY 546 kernels: 546 pass gates 1-4, 0 fail, 3 known findings; 576 controls: 576 red as planted, 0 missed; 0 limit problems. DSpine alone (--only "qwen27 dspine"):SUMMARY 9 kernels: 9 pass gates 1-4, 0 fail, 0 known findings; 3 controls: 3 red as planted, 0 missed; 0 limit problems.dspine_mlx(its taps and anchor), 4 prompts × 4 rounds: BF16 15/16 chains, 233/240 positions; affine-4 body against an affine-4 reference 14/16, 222/240; served mode (bridge linears affine-4 too) 6/16, 149/240; control (second pass off) 3/16.--parallel 2 --context 2048, multi.py agent 4×256 and chat 8×256: at T=0, c=1 and c=2, DSpine's and DFlash2's outputs equal plain decode (24/24 each); at T=1, c=2, DSpine's equal DFlash2's (12/12). A batch of 2 is bit-identical to each stream's own pass (30/30 proposals).cuda_dspine_weights.zigreadscore.dspine.tgInput, math unchanged):test-qwen35-dspine-host,test-cuda-hostand the CUDAnativebuild (sm_121) pass on the GB10 at this head.Speed (M3 Pro 36 GB,
qwen38-27b-mlx-4bit)One stream, drafter loop, T=0, up to 256 tokens, 15 nodes, the prompt set from #2592, decode tok/s:
A greedy chain instead of the tree was slower in every class (agent +0, chat −25, code −21 %), so the branch has no chain mode.
Served,
--parallel 2 --context 2048, aggregate tok/s (multi.py, agent 4×256, chat 8×256):TF_Q27_DRAFT_SLOTS=1Without tensor units every DSpine kernel is compute-bound in rows (one pass 37.8 ms for 1 stream, 68.4 ms for 2), so on the M3 Pro drafting both streams runs 4–9 % below drafting one at c=2;
TF_Q27_DRAFT_SLOTS=1gives the one-stream behaviour. The M3 Ultra cells (one stream +11..+62 % on agent) were on the earlier one-slot head; 2-stream Ultra cells on this head are the open number.36 GB Macs: with the stock 8 GiB margin no DSpine stream fits at context 4096 (4.3 GiB needed, 3.1 GiB left beside the weights and the drafter): the server refuses by name and says how far
iogpu.wired_limit_mbmust rise, or to lower--context. The served M3 Pro numbers above used a test-only 4 GiB margin build, not committed. Larger Macs are not affected.