Repository navigation
qwen27 metal: support SenseNova-Loop MLX-affine g64 checkpoints - #4415
Conversation
552de16 to
5f664ce
Compare
|
The published head On M5 Max (macOS 27.2, Zig 0.17.0), The trial includes the rebased #3859 and #3868 slices carried by #4415. The published tips of those two parent PRs still need to be brought onto that stack. Standalone parent evidence Igor Lessio - AIFLOW LABS |
5f664ce to
a794e4f
Compare
|
Thanks @gilby. Three correctness fixes are needed on the current head:
These are source-derived failures; the new regression tests need to exercise the actual loader, constructor and packing paths rather than only their expected test helpers.
|
|
Fixed all three items in commit
Verified on this commit:
|
|
Thanks @gilby. All three are fixed on
That closes the three points from our last review. Since this sits on #3868, the two land in order, and the overlaps with main are ours to sort out.
|
6130ffe to
d8f7793
Compare
…t double-free, reject lossy F32 AWQ scales
d8f7793 to
06af4b5
Compare
|
Thank you @gilby. 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
Adds Metal loading, execution-step physical layer aliasing, and speculative MTP drafting support for SenseNova-Loop-9B MLX-affine group-64 checkpoints (
mlx-q4g64,mlx-q5g64,mlx-q6g64,mlx-q8g64) with either BF16 or quantizedembed_tokens.zig/src/families/qwen27/loop_affine.zigloads unique physical layers, applies tensor-unitlaneOrderstrictly to physical matrices before aliasing the56runtime execution steps, and adds host width-resolution and admission tests for4/5/6/8-bit g64 configs (pure GPU path; no Neural Engine files or hooks).9d7f872be9), adding552de160c4f708b7f3ee00f4ccac7a54a7b701a6(12changed files).atc overlap --json: Timed out after 10s (TIMEOUT 10s);12changed files are scoped toqwen27affine/MTP/oracle loading,zig/src/native/metal.zig, andCHANGELOG.md.Checks on this head
552de160c4f708b7f3ee00f4ccac7a54a7b701a6python3 tools/zig/lean_check.py, on the base and on this head:9d7f872be9(7387files,167problems) ->552de160c4(7388files,167problems),0 new(tools/zig/lean_new.pyandtools/pr_check.py --base 9d7f872be9:0 error(s), 1 warning(s)).zig fmt --checkandgit diff --check 9d7f872be9..HEAD: passed.zig build -j6 test-qwen27 dev-tools native -Dcpu=apple_m1: exited0(includesrepackedAffineandadmit resolves and admits SenseNova-Loop MLX-affine g64 4/5/6/8-bit configs).test-metal-launch-map-host:1163 registered launches, 2 controls, 0 missing, plusqwen27/environment/residency host steps): exited0.64 GiB,macOS 27.2.1,--prompt-cache-gib 0): verified acrossSenseNova-Loop-9B-AWQ-g128(#3868parity),SenseNova-Loop-9B-MLX-Q4-hq, andSenseNova-Loop-9B-MLX-Q8(see Receipt below).552de160c4.AWQ-g128,MLX-Q4-hq, andMLX-Q8; non-Metal backends untouched.Receipt
64 GiB,macOS 27.2.1,--prompt-cache-gib 0),#3868(9d7f872be9) vs PR docs: show model speeds on TensorFold hero #4 (552de160c4) onSenseNova-Loop-9B-AWQ-g128:bench_cache.py --require-cold(2,571prompt tokens,qualified=True, all5rows cold):100%exacttoken_sha=eaa68149fc60&output_sha256=bc28c652a031match (firstTTFT3.421s -> 3.511s, rep[3.330, 3.348]s -> [3.395, 3.413]s, decode50.34 -> 48.61 tok/s, rep48.45 -> 48.66&48.75 -> 48.48 tok/s).bench_openai.py:20/20exacttoken_sha&output_sha256match acrossfibonacci-raw(T=0.0:50.75 -> 50.67 tok/s,sha=2f1d93533424;T=1.0:47.93 -> 47.08 tok/s) andgpu-chat-no-think(T=0.0:35.67 -> 35.66 tok/s,sha=c011df2b114c;T=1.0:36.93 -> 36.89 tok/s).64 GiB,macOS 27.2.1),SenseNova-Loop-9B-MLX-Q4-hq(PR docs: show model speeds on TensorFold hero #4):bench_concurrent.py --levels 1,4 --temperatures 0,1.0 --tokens 128 --reps 2 --alone --serial:0failed,0unmeasured,0unequal across all8cells (alone2/2&8/8,serial1/1&4/4,plain_drafted=0):code T=0c=1 41.7 tok/s/c=4 agg 140.4 tok/s(per 36.1,steady 149.7,accepted=77,sha=b5eabd2f8348),chat T=0c=1 31.7 tok/s/c=4 agg 108.0 tok/s(per 27.9,steady 115.0,accepted=61,sha=ce0afb1a0d65),code T=1.0c=1 35.2 tok/s/c=4 agg 119.6 tok/s,chat T=1.0c=1 30.3 tok/s/c=4 agg 102.7 tok/s.64 GiB,macOS 27.2.1),SenseNova-Loop-9B-MLX-Q8(PR docs: show model speeds on TensorFold hero #4):bench_concurrent.py --levels 1,4 --temperatures 0 --tokens 128 --reps 2 --alone --serial:0failed/unequal (alone2/2&8/8,serial1/1):code c=1 36.0 tok/s/c=4 agg 114.4 tok/s(per 29.4,steady 121.6),chat c=1 25.1 tok/s/c=4 agg 88.3 tok/s(per 22.9,steady 94.9).qwen27lane backend on M-series Macs).quantizationconfig metadata and#3868MTP env vars).552de160c4f708b7f3ee00f4ccac7a54a7b701a6, Zig0.17.0, Apple M5 Pro (64 GiB,macOS 27.2.1), checkpointsSenseNova-Loop-9B-AWQ-g128,SenseNova-Loop-9B-MLX-Q4-hq, andSenseNova-Loop-9B-MLX-Q8(sensenova/SenseNova-Loop-9Bderivatives).qwen27SenseNova-Loop MLX-affineg64loader, MTP scratch/batch sizing, and oracle harness (macOS build/host checks plus Apple M5 Pro serving across AWQ-g128, MLX-Q4-hq, and MLX-Q8 completed; MLXg64format unsupported on#3868before this PR).tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false:SenseNova-Loop-9B-AWQ-g128(#3868vs PR docs: show model speeds on TensorFold hero #4):20/20bench_openai.pyand5/5bench_cache.py --require-coldexacttoken_sha&output_sha256match (token_sha=eaa68149fc60,output_sha256=bc28c652a031;fib=2f1d93533424,chat=c011df2b114c).SenseNova-Loop-9B-MLX-Q4-hq:bench_openai.py--no-draftsgreedy vs MTP draft-on100%token_shamatch (fib=21e104d752ff,chat=6d8124a912ce);bench_concurrent.py0failed,0unmeasured,0unequal across all8cells (alone2/2&8/8,serial1/1&4/4,plain_drafted=0).SenseNova-Loop-9B-MLX-Q8:bench_cache.py(token_sha=eaa68149fc60),bench_openai.py(fib=67c0a36e36a0,chat=7f52b1da112e), andbench_concurrent.py(0failed/unequal acrossc=1/c=4).#3868(9d7f872be9) vs PR docs: show model speeds on TensorFold hero #4 (552de160c4) onSenseNova-Loop-9B-AWQ-g128(Apple M5 Pro) shows100%exact token parity above;MLX-Q4-hqandMLX-Q8checkpoints are newly enabled by this PR.tools/bench_openai.py(Apple M5 Pro,64 GiB):SenseNova-Loop-9B-AWQ-g128(#3868 -> PR #4):fibT=0.050.75 -> 50.67 tok/s(sha=2f1d93533424),T=1.047.93 -> 47.08 tok/s;chatT=0.035.67 -> 35.66 tok/s(sha=c011df2b114c),T=1.036.93 -> 36.89 tok/s.SenseNova-Loop-9B-MLX-Q4-hq(PR #4,--no-drafts -> MTP):fibT=0.021.82 -> 38.02 tok/s(1.74x),chatT=0.021.80 -> 31.21 tok/s(1.43x);T=1.0medfib 39.35 tok/s,chat 28.17 tok/s.SenseNova-Loop-9B-MLX-Q8(PR #4, MTP):fibT=0.033.69 tok/s,chatT=0.023.15 tok/s;T=1.0fib 30.69 tok/s,chat 22.42 tok/s.ttft_sfromtools/bench_cache.py --require-coldon a long prompt, or "n/a" with the reason when the change cannot reach prompt processing (Apple M5 Pro,2,571prompt tokens,qualified=True):SenseNova-Loop-9B-AWQ-g128(#3868 -> PR #4, all5rows cold):firstTTFT3.421s -> 3.511s, rep[3.330, 3.348]s -> [3.395, 3.413]s, decode50.34 -> 48.61 tok/s(rep48.45 -> 48.66&48.75 -> 48.48 tok/s).SenseNova-Loop-9B-MLX-Q4-hq(PR #4): cold TTFT4.846s(first),4.717s / 4.677s(rep), decode39.99 / 42.51 / 41.28 tok/s, concurrentstreams=2makespan10.987s(token_sha=eaa68149fc60).SenseNova-Loop-9B-MLX-Q8(PR #4): cold TTFT7.628s / 7.506s / 7.525s, decode33.65 / 33.16 / 32.92 tok/s(token_sha=eaa68149fc60).sensenova/SenseNova-Loop-9Bquantized weights).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.
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.
Drafted output equals
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.No precision traded for speed. If the bits change, the description says which sums change and why.
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