Repository navigation
Description
Measurements for the 64 GB row of the README's memory-class table, plus the recipe book's decode, concurrency, cold/resumed/post-restart and exactness checks, on real 64 GB hardware (not an emulated budget). Everything uses the recipe's launch command at the v0.3.5.1 tag and your own tools/bench_openai.py / tools/bench_concurrent.py where they apply. Two behaviours worth a look are filed separately: #71 (resume lost near the fitted window with DFlash2) and #72 (a long prefill stalls other streams' decode).
Setup
| Machine | MacBook Pro Mac17,9, Apple M5 Pro, 20-core GPU, 64 GB, macOS 26.5.2 (25F84), on AC power |
| Budget inputs | iogpu.wired_limit_mb=56320 (Metal working set 55 GiB), so the budget is min(0.70 × 64 GB, 55 GiB) = 44.8 GiB, the table's ceiling |
| Other load | a terminal multiplexer and a few idle CLI sessions; startup reported 2.8–6.7 GB "in use elsewhere" (3.5 GB at the first stock run; the higher values came after the 0.85-budget run in the #50 comment pushed apps into swap) |
| Thermal | pmset -g therm every 30 s from 23:43 to 04:20 (every Qwen 4-bit and Nemotron step): no thermal or performance warning recorded |
| Runtime | TensorFold 0.3.5.1 (beddbb7, installed from the git tag), Python 3.12.13, mlx 0.31.2, mlx-metal 0.31.2, mlx-lm 0.31.3 |
| Checkpoints | Vontra/Qwen3.8-27B-MLX-4bit@70ae7fac, z-lab/Qwen3.8-27B-DFlash2@50307d4c, Vontra/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit@8bbcb5b6, Vontra/Qwen3.8-27B-oQ2@8cf0a7da |
| Launch | tensorfold serve <model> --name bench (+ --no-drafts / --drafter none where stated) |
| Peak memory | ri_lifetime_max_phys_footprint from proc_pid_rusage (the counter your admission reads, as a lifetime maximum), in bytes |
64 GB memory-class cells
| Fitted context | Peak phys_footprint | Workload that set the peak | |
|---|---|---|---|
| Qwen3.8-27B + DFlash2 | 140,288 | 43.69 GiB (46,909,402,008 B) | cold + resumed ladder up to a 139,922-token prompt |
Qwen3.8-27B, --drafter none |
152,576 | 39.87 GiB | 152,210-token prompt, cold + resumed |
| Nemotron 3.5 Lightning | 262,144 (full window) | 42.21 GiB | reached during model load and warm-up; the 261,780-token prompt (cold + resumed) peaked at about 39.3 GiB live |
| Qwen3.8-27B-oQ2 + DFlash2 | 172,032 | 43.81 GiB (47,042,651,208 B) | 171,667-token prompt, cold + resumed |
Swap did not grow during any of these steps. (The Nemotron and oQ2 steps started from about 1.7 GB of swap left over from an earlier run.) Qwen3.8 Flash Next was not run: 4-bit weights of about 95 GB exceed the 44.8 GiB budget. --no-drafts also fits 152,576 (the drafter isn't loaded).
Decode: tools/bench_openai.py --tokens 64 --reps 5 --temperatures 1.0,0, medians in tok/s
| Code sampled | Chat sampled | Code greedy | Chat greedy | |
|---|---|---|---|---|
| Qwen3.8-27B + DFlash2 | 62.8 | 45.9 | 61.2 | 56.2 |
Qwen3.8-27B --no-drafts |
16.6 | 16.1 | 16.2 | 16.3 |
Qwen3.8-27B --drafter none |
16.2 | 16.2 | 16.6 | 16.4 |
| Nemotron 3.5 (MTP) | 146.0 | 123.3 | 131.3 | 135.3 |
Nemotron 3.5 --no-drafts |
107.8 | 109.0 | 109.5 | 109.0 |
| Qwen3.8-27B-oQ2 + DFlash2 | 41.8 | 37.2 | 92.1 | 47.9 |
--drafter nonedecodes at the serial rate on these fixtures. Inserve.log, 16 of its 25 short requests showaccepted=0/0 rows=1.0and 9 showaccepted=1/19. The one exception is the resumed turn of a 152K-token prompt, which accepted 22/74. The recipe separates--drafter none("disables that draft model") from--no-drafts("disables all drafts"), which suggests some drafting remains; on these fixtures it adds nothing measurable.- oQ2 against 4-bit, same drafter: DFlash2 acceptance is 17.0% on oQ2 (2,696/15,861 over the first 40 requests) against 31.6% on 4-bit (2,911/9,202). So oQ2 is slower on the sampled cells, and faster only on greedy code (92.1 vs 61.2). Its sampled code cell varied from 31.8 to 92.1 across the five repetitions.
Concurrency and exactness: tools/bench_concurrent.py --alone --serial
No inequality anywhere.
| Checked | Equal | |
|---|---|---|
| Qwen3.8-27B + DFlash2, levels 1,2,4,8 | 180 concurrent replies vs solo; solo vs "draft": false |
180/180; all serial equal |
| Nemotron 3.5, levels 1,2,4,8 | same | 180/180; all serial equal |
| oQ2, levels 1,4 | same | 60/60; all serial equal |
Aggregate tok/s at C=1 / 2 / 4 / 8:
| Code sampled | Chat sampled | Code greedy | Chat greedy | |
|---|---|---|---|---|
| Qwen3.8-27B + DFlash2 | 79.4 / 121.8 / 148.5 / 194.1 | 50.5 / 84.1 / 114.8 / 158.2 | 78.9 / 117.7 / 158.2 / 201.4 | 55.1 / 84.9 / 117.2 / 167.1 |
| Nemotron 3.5 | 152.3 / 165.5 / 216.3 / 252.6 | 131.0 / 173.4 / 205.8 / 241.4 | 189.9 / 222.0 / 318.7 / 334.7 | 129.6 / 169.5 / 232.6 / 274.3 |
The recipe's release checks (drafted/serial and resumed/fresh, with thinking on and off and with tools), compared by token_sha on Qwen3.8-27B + DFlash2:
- Short prompts: 8/8 equal. The cells are code and tool prompts × thinking on/off × greedy/sampled (seed 1234). Drafting was 4.8–7.3× faster than serial.
- Caveat: the plain code prompts fall under the planner's 256-token minimum, so their "resumed" run reused nothing. Only the tool prompts truly resumed (258 cached tokens).
- 8,192-token prompt: 4/4 equal with a real resume (8,192 cached tokens). Drafting was 2.85–3.48× faster than serial.
- Across restarts: every replayed request matched its pre-restart
token_sha, whether it hit or missed the cache.
Long context: cold, resumed and after restart (Qwen3.8-27B + DFlash2)
Fixture: ggml-org/llama.cpp@90c26fcd, files src/*.cpp then ggml/src/*.c* in sorted order. It's tokenized with the served model's tokenizer and cut to N tokens, behind a per-request nonce line. The question asks about the first file. Replies are 64 tokens, greedy, ignore_eos, thinking off. "Resumed" adds one assistant and one user turn. Each request body is saved with its sha256.
| Rendered prompt tokens | Cold TTFT | Cold prefill rate | Decode at depth | Resumed: cached / TTFT |
|---|---|---|---|---|
| 8,224 | 19.5 s | 423 tok/s | 25.5 | 8,192 / 0.25 s |
| 16,417 | 41.0 s | 401 | 29.8 | 16,384 / 0.31 s |
| 32,800 | 90.5 s | 363 | 24.4 | 32,768 / 0.37 s |
| 65,569 | 221.6 s | 296 | 20.5 | 65,536 / 0.61 s |
| 98,337 | 395.1 s | 249 | 15.8 | 98,304 / 0.69 s |
| 131,106 | 578.4 s | 227 | 15.7 | 0 / 574 s (see #71) |
| 139,922 | 640.5 s | 219 | 16.3 | 0 / 644 s (see #71) |
- At the fitted window: 139,922 tokens is accepted. One conversation growing past it gets a clean HTTP 400: "maximum context length is 140,288 tokens, the most this server's memory budget fits, but the rendered prompt has 146,035 tokens … Compact or shorten the conversation."
- Nemotron processed 261,780 tokens cold in 311.5 s (about 840 tok/s) and resumed it in 0.63 s, with all 261,774 tokens cached.
After a restart (SIGTERM, then the same launch):
- System blocks: a 3,862-token system block was written to
prefix-snapshots/and loaded at startup. The replayed request had 3,862 cached tokens and a 0.20 s TTFT, against 8.57 s before the restart, with an identicaltoken_sha. - Conversations: SIGTERM saved "conversation checkpoint tokens=8192 (0.7 GiB)". After the restart, the replayed 8,217-token conversation had 8,192 cached tokens and a 0.25 s TTFT, against 20.6 s cold, with an identical
token_sha. Persistence works end to end.
The swap cliff from #36
A single conversation grew by 6,144 tokens a turn up to the 140,288 window. That's #36's shape on a 64 GB M5 Pro. Swap stayed at 653–656 MB throughout, and the peak footprint was 43.57 GiB. On this machine, 0.3.5's admission fix holds: it doesn't swap. What happens now is a silent re-prefill from about 100K tokens (#71).
The two #50-related results (shared-prefix concurrency on 64 GB, and raised budget fractions) are posted as a comment on #50.
Raw data: startup reports, serve.log, bench JSON, per-request results and request bodies, the proc_pid_rusage timeline, provenance and the fixture builder are in the archive attached in the first comment.
Activity
benwilson commentedon Sep 28, 2026
Raw data for the tables above: per-request results and request bodies, engine logs, bench JSON, memory timelines, provenance and scripts (see README.md inside).
tensorfold-m5pro64-0351.tar.gz
ashhart commentedon Sep 29, 2026
Thanks @benwilson. This is the most complete run anyone has sent us, and it's now in the docs. The README's 64 GB
row takes your fitted contexts and peak footprints, each marked 0.3.5.1 so nobody reads them as a later
release's. The Qwen3.8-27B recipe keeps your setup: machine, budget inputs, runtime, checkpoint revisions, launch,
the llama.cpp@90c26fcd fixture, the cold and resumed ladder to 139,922 tokens, decode medians and the exactness
checks. Nemotron's cell and numbers are in its recipe.
On
--drafter nonedecoding at the serial rate: that's expected on these fixtures. It turns off DFlash2 but keepscontext copies, which draft from spans that repeat earlier in the prompt or reply. Your code and chat prompts don't
repeat much, so there was little to copy, except in the resumed 152K turn, where copies did land.
--no-draftsturns copies off too.
#71 has its fix in 0.3.6.3 (details on that issue), and #72 is next. I'm closing this one as captured in the docs.
Thank you for the care that went into it.
benwilson commentedon Sep 29, 2026
Update: the 64 GB row on 0.3.6.2 and 0.3.6.3, plus the first real-hardware Flash Next cell. Same Mac, fixture and launch command (
tensorfold serve <model> --name bench). Each release had its own fresh venv: 0.3.6.2 (71377a5) with mlx 0.32.3, and 0.3.6.3 (1911880) with mlx 0.32.2 as pinned. Peaks areproc_pid_rusagelifetime maxima, as before. Startup reported 6.7–8.6 GB "in use elsewhere" in these runs, against 3.5–6.7 GB in the 0.3.5.1 run's stock Qwen and Nemotron steps. That changes admission's stream counts but not the fitted contexts. Swap stayed flat throughout.64 GB memory-class cells
--drafter none--ple-on-ssd --ssd-experts 24Cells are fitted context / peak phys_footprint. On 0.3.5.1, Nemotron's peak was set at model load. On 0.3.6.2 the load transient (about 34 GiB) no longer sets the peak; the 38.67 GiB came later, under requests.
Decode:
tools/bench_openai.py --tokens 64 --reps 5 --temperatures 1.0,0, medians in tok/s--no-drafts, 0.3.6.2--drafter none, 0.3.6.2--no-drafts, 0.3.6.2--no-drafts, 0.3.6.3--drafter nonestill decodes at the serial rate on these fixtures.Exactness: no inequality anywhere, again
bench_concurrent --alone --serial, levels 1,2,4,8: 180/180 equal, and every solo run equal to"draft": false, for Qwen on 0.3.6.2 and on 0.3.6.3, and for Nemotron on 0.3.6.2. Flash Next at levels 1,2 on 0.3.6.3: 36/36.token_shaon 0.3.5.1 and 0.3.6.2. Resumed replies differed at 8K, 16K, 32K and 140K but matched at 64K, 96K and 128K (the 128K pair had 0 cached on both). 0.3.6.2's startup logs a chunk plan ("prompt chunks of up to 2,048 tokens, cut at replies 256+ tokens apart") that 0.3.5.1's doesn't. That may explain part of it, though not the 140K pair, which also had 0 cached on both releases and still differed.Long context, Qwen3.8-27B + DFlash2
Nemotron's prefill is faster at full depth on 0.3.6.2. The 0.3.6 note says "Nemotron takes up to 8,192 tokens a chunk on M5 GPUs, 12-15% faster at 8k and 32k". On this M5 Pro the startup line reads "prompt chunks of up to 4,096 tokens", presumably sized to the 64 GB budget. A 261,780-token cold prompt took 274.0 s (956 tok/s) against 311.5 s (840 tok/s) on 0.3.5.1: 12% less time, 14% more throughput. Resuming it still costs 0.62 s, with 261,774 cached.
One admission change worth a look, Nemotron at 64 GB on 0.3.6.2. Its startup line says "a shared round up to 7.16 GB" and "0 streams of 8,192 tokens fit now", against 1.31 GB and 6 streams on 0.3.5.1. Short concurrent requests still ran fine (the 180/180 above), but by that estimate no 8K Nemotron stream would share a round here. "In use elsewhere" was 7.9 GB against 6.7 GB, which doesn't account for it. Flash Next's startup says the same "0 streams" on 0.3.6.3, with "a shared round up to 7.97 GB".
Re-tests of the two bugs on 0.3.6.2 and their verification on 0.3.6.3 are on #71 and #72. The mlx 0.32.3 /
--ssd-expertscrash is on #88. Raw data for these runs (same layout as the first archive) is available on request.feat: impossible checkpoints keep the others, NVFP4 checkpoints on CU…