Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
630378d
inkling2 metal: a verify window keeps its convolution histories in pl…
plotarmordev Nov 23, 2026
a99fc85
changelog: card 234's first DSpark hold lever, not yet measured
plotarmordev Nov 23, 2026
9a43bdd
Merge remote-tracking branch 'origin/feat/210-inkling-2-mini-on-mac-f…
plotarmordev Nov 23, 2026
4ccf355
changelog: record candidate float64 Metal gate
plotarmordev Nov 23, 2026
064c357
changelog: card 234's real-checkpoint DSpark exactness session, speed…
plotarmordev Nov 23, 2026
6255918
Merge remote-tracking branch 'origin/feat/210-inkling-2-mini-on-mac-f…
plotarmordev Nov 23, 2026
7419031
changelog: card 234's exactness re-run on the merged base, speed stil…
plotarmordev Nov 23, 2026
5fac511
changelog: card 234's 64-stream DSpark exactness check, speed still u…
plotarmordev Nov 23, 2026
bce1cdb
receipts: card 234's Mac window run of the DSpark hold lever
plotarmordev Nov 23, 2026
b5f3d2d
changelog: card 234's measured DSpark hold lever
plotarmordev Nov 23, 2026
ac528e7
receipts: card 234's 1 and 64-stream receipt against oMLX
plotarmordev Nov 23, 2026
844ae1a
changelog: card 234's receipt against oMLX
plotarmordev Nov 23, 2026
29ff045
receipts: card 234's measured bandwidth ceiling and 64-lane receipt a…
plotarmordev Nov 23, 2026
66bb3d1
changelog: card 234's ceiling and 64-lane receipt
plotarmordev Nov 23, 2026
9022541
receipts: card 234's plain control/candidate/control and bandwidth ti…
plotarmordev Nov 23, 2026
1038e2d
changelog: card 234's measured bandwidth and plain rounds
plotarmordev Nov 23, 2026
f9d6745
receipts: card 234 states the one-stream bar is not reached, no #4618…
plotarmordev Nov 23, 2026
fd362e7
inkling2 metal: a verify that fails after its forward rolls back to a…
plotarmordev Nov 24, 2026
ea3f266
receipts: card 234's run.sh runs the plain controls and bandwidth; pl…
plotarmordev Nov 24, 2026
f8b9b3c
changelog: card 234's rollback test, 64-lane exactness and plain pari…
plotarmordev Nov 24, 2026
f1f03a5
receipts: card 234's control/candidate/control repeat in its own Mac …
plotarmordev Nov 24, 2026
371a7be
changelog: card 234's window repeat, four-stream gain and plain parity
plotarmordev Nov 24, 2026
c553ad9
inkling2 metal: the rollback test checks an open verify window leaves…
plotarmordev Nov 24, 2026
226a1b9
receipts: card 234 marks the plain-chat controls disturbed and report…
plotarmordev Nov 24, 2026
529f837
card 234 work: staged changes carry forward to ship head
plotarmordev Nov 24, 2026
664dd36
Merge remote-tracking branch 'origin/feat/210-inkling-2-mini-on-mac-f…
plotarmordev Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.d/234-inkling-2-mini-on-mac-beat-4618-on-m5-ul.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Inkling 2 Mini on Metal: a DSpark round stops saving its convolution histories

- A verify window no longer copies a stream's 1.9 MB of convolution histories aside before its forward and back after a rejection: the forward leaves the histories alone while a window is open, and the keep takes them from the staged taps of the rows it keeps. Every stream's keep shares one command buffer and one wait a round, where each stream had its own before the forward and one more after a rejection; a stream's cache is 1.9 MB smaller. A real-checkpoint test checks an open window leaves the histories byte for byte as before it, then fails a verify after its forward and checks the next decode's logits equal an untouched stream's bit for bit, beside a planted stale-history stream that differs.
- Exactness on the official checkpoint, M5 Ultra, at `62559184d` (card 210's base merged in, with its drafted lone-copy pricing): the Metal greedy gate passes against the float64 host reference (0 of 32 tokens differ, `zig build test-inkling2-metal-float64`), and one DSpark server session at 1 and 4 streams on the code and chat prompts had 0 failed requests, every concurrent reply equal to its run alone (10 of 10) and every drafted reply equal to its plain one, with 176 and 154 drafts accepted.
- 64 streams hold on one DSpark server (`--parallel 64`, 65,536-token context): a separate session of 32-token replies on the code and chat prompts had 0 failed requests and all 128 concurrent replies equal to their runs alone; the committed 64-lane receipt cells carry no such check. Past the drafter's reach the lanes decode one token a round, 64 rows over two 32-row batches, at 273 tok/s total on code and 246 on chat: one rep, outside a window.
- Measured in the Desk's Mac GPU window against card 210's tip, control/candidate/control/candidate, medians of three (`docs/receipts/inkling-2-mini-metal-234`): with DSpark at four streams a round is 1 ms shorter and code reads 282.7 and 285.7 tok/s against 275.7 and 274.9; chat 233.6 and 235.7 against 227.7. At one stream it is inside noise, 118.0-120.2 against 118.9-122.2. Bar not reached: one stream reads 118.0-120.2 tok/s at `1038e2d4` against #4618's 123. Every cell had 0 failed requests and replies equal to their runs alone; 45K prefill reads 2,365 tok/s. The GPU measured 1,020 GB/s, so a plain step's floor is 182 tok/s and the 62 measured is 34% of it. Against oMLX's 4-bit MTP build on the same Mac, the only competitor measured there, paired medians on the chat prompt with TensorFold on 8 lanes: 49.0 against 38.4 tok/s at one stream, 141.4 against oMLX's 225.6 at 64.
- A repeat in a window for this card alone (load 3-20) at `f8b9b3c0a` against `781eeab52`, controls within 0.3% of each other except plain chat, which is disturbed and not compared: DSpark at four streams reads 288.0 / 237.3 tok/s (code / chat) against 281.4-282.1 / 228.9-229.3 and a round is 0.7-0.9 ms shorter; at one stream it gains nothing (124.3 against 126.6-126.8 on code). Plain code reads 60.1 and 221.5 at one and four streams against 61.5-61.6 and 210.0-210.2. #4618 was not run on this Mac, so this is not a claim to beat it.
102 changes: 102 additions & 0 deletions docs/receipts/inkling-2-mini-metal-234/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Inkling 2 Mini on Metal, M5 Ultra: card 234's receipt

Apple M5 Ultra, 256 GB, macOS 27.0, the official checkpoint with its own `mtp.safetensors` as the DSpark drafter,
`tensorfold-native` from `zig build native -Doptimize=ReleaseFast`, `--context 65536`. The Desk's Mac GPU window,
24 Nov 02:02-02:38 HKT, one lock held for the whole sequence (`run.sh`); the load average at each step is in its line
below, since other cards' CPU work kept running.

Control: card 210's tip `781eeab52`. Candidate: `630378dc0` on that base (a verify window keeps its convolution
histories in place; every stream's keep shares one command buffer).

## Ceiling

A plain step reads about 5.6 GB: 8 of 128 experts (5.1 MB each) in 48 layer passes (24 layers, the 12 core ones three
times) is 1.96 GB, the other layer weights 2.7 GB over the same passes, the bf16 LM head 0.93 GB. `bandwidth.py` over
4 GiB arrays, six timed passes each, at 05:04 (load 123, the GPU otherwise idle):

| pass | GB/s (median) | ms a pass |
|---|---|---|
| read (sum) | 1,021 | 4.20 4.14 4.15 5.59 4.22 4.26 |
| add (2R+1W) | 1,029 | 13.18 12.89 12.52 12.53 12.45 12.36 |
| copy (1R+1W) | 1,004 | 8.48 8.55 8.53 8.59 8.56 8.56 |

Three earlier runs at 03:46, beside other cards' GPU work, read 388-991 and are not used. At 1,020 GB/s a plain step's
floor is 5.5 ms, 182 tok/s, and at a practical 75% of it 137 tok/s. The 16.1 ms plain step (62 tok/s) is 34% of the
floor; DSpark at one stream, 3.33 tokens a 28.2 ms round, is 20% of its 3.33 × 182 bound. Bytes do not set the step:
its dependent chain of kernels does, so the hold lever cuts launches and waits, not reads.

## DSpark hold lever

`bench.sh` (card 210's): medians of three reps, `--levels 1,4 --tokens 256 --temperatures 0 --alone --serial`.

| tok/s (code / chat) | control | candidate | control | candidate | #4618 |
|---|---|---|---|---|---|
| 1 stream | 118.9 / 96.8 | 120.2 / 93.3 | 122.2 / 45.6* | 118.0 / 95.3 | 123 |
| 4 streams | 275.7 / 227.7 | **282.7 / 233.6** | 274.9 / 190.3* | **285.7 / 235.7** | 281 |
| 4-stream round, code | 39.3 ms | 38.5 ms | 39.4 ms | 37.9 ms | |

\* reps 81/32/46 and 112/190/216: disturbed, not used.

- At four streams the lever is kept: code is 2.5-3.9% over both controls, chat 2.6-3.5% over the clean control, a
round is 1 ms shorter at the same 2.81 tokens. #4618 reads 281 there.
- At one stream it is inside noise (118.0-120.2 against 118.9-122.2). Bar not reached: one stream reads 118.0-120.2
tok/s at `1038e2d4` against #4618's 123. Strata v0.2.19 reads 108.9-114.5 on M5 Max, another chip: a deployment
comparison, not a chip one.
- Plain at 05:00-05:04 (load 80-127) moved single reps by up to 40%; its repeat is below.
- Every cell: 0 failed requests, every concurrent reply equal to its run alone (12 of 12), drafted equal to plain.

## Repeat, 24 Nov 11:02-11:09

A second Desk window for this card alone, idle GPU, load 3-20; candidate `f8b9b3c0a` (the lever plus its rollback
test), control `781eeab52`, both built before the first bench, one lock over the six sessions. The two controls agree
within 0.3% in every cell but plain chat.

| tok/s (code / chat) | control | candidate | control |
|---|---|---|---|
| DSpark, 1 stream | 126.6 / 93.0 | 124.3 / 95.3 | 126.8 / 92.9 |
| DSpark, 4 streams | 282.1 / 229.3 | **288.0 / 237.3** | 281.4 / 228.9 |
| DSpark 4-stream round, code | 38.8 ms | 37.9 ms | 38.6 ms |
| plain, 1 stream | 61.6 / 61.0* | 60.1 / 59.8 | 61.5 / 56.3* |
| plain, 4 streams | 210.2 / 223.0* | 221.5 / 221.0 | 210.0 / 126.4* |

\* plain chat: the controls are 8% apart at one stream and 43% at four (reps 110.4/192.6/126.4), so both pairs are
disturbed and plain chat is not compared.

- The lever repeats at four streams: code 2.1-2.3% and chat 3.5-3.7% over both controls, a round 0.7-0.9 ms shorter.
- At one stream it gains nothing: code 124.3 (reps 127.4, 116.2, 124.3) against 126.6-126.8, chat 95.3 against 93.
- Plain code reads 60.1 against 61.5-61.6 at one stream and 221.5 against 210.0-210.2 at four.
- #4618 reports 123 at one stream and 281 at four; it was not run on this Mac, so these medians are not a claim to
beat it. At this window's low load the controls already read 126.6-126.8 at one stream.
- A second candidate pass at 11:09-11:14 ran as load rose to 50 (DSpark four-stream code reps 282.4, 252.5, 238.6;
plain reps down to 41) and is not used. Every cell of both passes: 0 failed requests, every concurrent reply equal
to its run alone, drafted equal to plain.

## Prefill at 45K

`prefill.sh` with the drafter on: **2,365 tok/s** median (2,164-2,368), first token in 19.5-21.3 s; card 210 read
2,439 without the drafter. Each repeat equals its fresh reply but reads 0 cached tokens with `--drafter`, where card
210's plain session read 46,080: the drafter session does not reuse the prompt cache.

## Engines at 1 and 64 streams

oMLX's own 4-bit MTP build `Inkling-2-Mini-oQ4e-mtp` is the only competitor measured on this Mac (Strata and
llama.cpp were not). Card 235's `engines.sh` ran both engines in one session, TensorFold on its default 8 lanes, under
other cards' CPU load (35-77). oMLX streams each code reply in one chunk after 13 s, so its code cells are unmeasured;
the comparison is on chat.

| chat, tok/s total, paired medians | TensorFold, 8 lanes | oMLX |
|---|---|---|
| 1 stream | **49.0** | 38.4 |
| 64 streams | 141.4 | **225.6** |

- oMLX leads at 64 streams: on 8 lanes, 56 of TensorFold's 64 requests queued (168 of 192 waited 10-55 s). A second
paired session read 48.0 against 24.8 and 154.8 against 203.3.
- Unpaired, no oMLX in its session: `engines.sh` here, DSpark on 64 lanes with no request queued, read chat 90.2 at
one stream and 306.6 at 64, code 115.4 and 399.1.
- 0 failed requests in every cell of both engines.

## Files

`cells.jsonl`: every cell (medians, reps, round, `alone`, `serial`); `prefill45k.txt`; `bandwidth.py` measures the
ceiling's bandwidth; `engines.sh` runs TensorFold's receipt cells; `run.sh` reproduces the sequence: bandwidth, DSpark
and plain control/candidate/control, prefill and engines.
28 changes: 28 additions & 0 deletions docs/receipts/inkling-2-mini-metal-234/bandwidth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# bandwidth.py: the GPU's streaming bandwidth over 4 GiB arrays, medians of six timed passes. Run it with an MLX Python
# (oMLX's venv has one) under `lockf -k /tmp/tensorfold-model.lock`.
import statistics
import time

import mlx.core as mx

n = 1 << 30
a = mx.random.uniform(shape=(n,))
b = mx.random.uniform(shape=(n,))
mx.eval(a, b)


def report(name, fn, bytes_moved, reps=7):
ts = []
for _ in range(reps):
mx.synchronize()
t = time.perf_counter()
mx.eval(fn())
mx.synchronize()
ts.append(time.perf_counter() - t)
ms = " ".join(f"{t * 1e3:.2f}" for t in ts[1:])
print(f"{name:13s}{bytes_moved / statistics.median(ts[1:]) / 1e9:5.0f} GB/s ms: {ms}")


report("read (sum)", lambda: a.sum(), 4 * n)
report("add (2R+1W)", lambda: a + b, 12 * n)
report("copy (1R+1W)", lambda: a * 1.0, 8 * n)
Loading