Repository navigation
Prefill 8bit prompt windows - #3280
Conversation
|
Thanks @scchumbletech. The existing row-block dispatch is reused, with decode and the reg path preserved; all 35 host checks pass. Please shorten the two-line explanatory comment to one purpose line: it adds one lean finding on current main. The M5 Max receipt is useful. We will run the device check on our side, retaining the Ultra control separately from the newly enabled hardware.
|
|
Thanks @scchumbletech. The gate comment is now one purpose line, the accidental iterator change is gone, and all 35 host checks pass with zero new lean findings. We will run the device check on our side on M5 Ultra as the unchanged-path control, keeping your M5 Max evidence separate for the newly enabled path.
|
|
READY. The promised 8-bit unchanged-path control is GREEN: native builds and 10 host tests pass, with identical tokens across cold 2K-64K prompts, 1/2/4/8-stream greedy and sampled runs, and resumed chat with thinking on and off. Timing medians stay within the cell bound; the widest sweep is 0.6% lower. This qualifies the existing Ultra path; the Max speedup remains your reported result. Queued to land after the 1.2.9 cut.
|
|
Thanks @scchumbletech, and sorry this one waited after our check came back green; it is ready to land. One thing first: the commits are authored with a work email address, and we only land commits authored with a GitHub noreply address, so your address does not end up in our public history. Could you re-author all six commits with your noreply address (GitHub, Settings, Emails) and force-push? For example: after
|
48926fa to
adb2b83
Compare
|
Re-authored all six commits with the noreply address and force-pushed — new head adb2b83. Tree is unchanged from the reviewed head (byte-identical diff), author dates preserved, base untouched. Ready to land from my side. |
|
I checked the re-authoring from GitHub's force-push record. The immediate pre-push head The current head trial-merges cleanly into main Igor Lessio - AIFLOW LABS |
… Mac ashhart#2851 gates the 16-row-block prompt path on Ultras; an M5 Max falls back to one 16-row window a dispatch and streams the whole weight slab per dispatch. Open the path on tensor units at large, Ultras keeping their long keys. Receipt (Apple M5 Max 40-core, 128 GB, Qwen3.8-27B-MLX-8bit, 8k salted unique-prefix prompt, streaming TTFT, 3-run median, --drafter z-lab/Qwen3.8-27B-DFlash2, --parallel 4, --context 262144): - main 09a9eb3: 336 tok/s cold 8-bit prefill - this change: 531 tok/s (+58%), replies byte-identical on the measured prompts - 4-bit unchanged (842-858 tok/s stock-level across runs)
The dispatch test held every non-Ultra Mac to 16 rows a dispatch; on a tensor-unit Mac the change takes the row blocks ashhart#2851 gave Ultras. The non-tensor-unit expectation stays.
Per review: the two-line explanatory comment above the row-block gate read as one purpose line; it is one line now, and the lean checker is back to 342.
The gate-comment commit mistyped deinit's lanes loop as `it`; this restores `lane_it`. The tree is the benchmarked build with the one-line gate comment.
adb2b83 to
d277846
Compare
|
Thank you @scchumbletech. 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. |
What this changes
#2851 takes a non-reg prompt chunk's 16-row blocks in one dispatch on Ultras only (
longPromptends with " Ultra"). On other tensor-unit Macs — an M5 Max here — the same chunks fall back to one 16-row window a dispatch, and each dispatch re-reads the projection's whole weight slab: a Qwen3.8-27B MLX 8-bit 8k prompt streams ~517 slab reads and sits at the memory bus. This opens the same row-block path on tensor units at large (k.device.tensorUnits()), Ultras keeping their long-key behavior exactly.atc overlap --json: not run (atc is not installed here); by hand, no open PR touches these gate lines.Checks on this head
zig build test— 844/848 steps, 3215/3246 tests passed, 29 skipped, 2 failed; both failures are pre-existing on main on this machine (PDF message normalization insrc/server/messages.zig:371, unrelated to quant). The updated dispatch test passes on tensor units and keeps the 128-dispatch expectation on non-tensor-unit devices.k.device.tensorUnits()), unreachable from those backends.Receipt
Main against branch, Apple M5 Max 40-core GPU, 128 GB, macOS 26.x, Zig 0.17.0, Xcode Metal toolchain 27B47 (Metal 32023.922), checkpoint
TensorFold/Qwen3.8-27B-MLX-8bit, serve string--drafter z-lab/Qwen3.8-27B-DFlash2 --parallel 4 --context 262144 --thinking --reasoning-effort xhigh --thinking-budget 131072, 8k salted unique-prefix prompt (fresh KV, no prefix retention), streaming TTFT-based rate, 3-run median, fresh server per run:Replies byte-identical main against branch on the measured prompts (5/5 greedy prompts, drafted and non-drafted paths). GPU pegged at 1620 MHz during passes.
4-bit unchanged: 842–858 tok/s stock-level across runs (the reg path is untouched).
Decode: unchanged — prompt gating only; the decode/verify path keeps its 16-row keys.
New switch: none. Non-reg prompt chunks on tensor-unit Macs take the row-block path automatically; every other caller keeps main's schedule.
Paths reached: Metal qwen27 non-reg widths (8/6/5/3/2-bit, oQ mixes) on any tensor-unit Mac. Could not run: Ultra (no hardware) — behavior there is main's.
Exactness: drafted = plain, byte-for-byte, on all measured prompts.
Prompt speed: the numbers above. Decode speed: n/a (unchanged code path).
Licence of new weights or drafters: n/a.
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo (byte-identical on the measured prompts; the dispatch change does not alter any arithmetic).--drafter, no slower than without it, greedy and sampled