Skip to content

The calibration gives its memory back; each run records the memory free at its start - #27

Merged
audenvenn merged 1 commit into
mainfrom
memory-at-start
Nov 17, 2026
Merged

audenvenn merged 1 commit into
mainfrom
memory-at-start

Conversation

@audenvenn

Copy link
Copy Markdown
Owner

A defect, found while looking into the 27B round's memory abort. The GPU calibration ran in the harness's own process before the engine started, and MLX kept what it used cached there for the rest of the run.

Measured with footprint: the harness held 3.55 GB after calibrate() (MLX cache 3.49 GB), and still 3.55 GB after mx.clear_cache(). So every agent run and speed test so far had about 3.5 GB held beside the engine. These buffers are mostly filled with zeros and ones, so under pressure the compressor can shrink them a lot. Still, they make pressure arrive earlier, and they lower the "available before start" baseline.

The calibration now runs in a process of its own that ends before the engine starts:

  • the harness stays at 0.03 GB;
  • the measurements are the same (18.88 TFLOPS and 136.3 GB/s, against 19.0 and 135.9).

Memory at start, recorded and shown. Runs and speed tests now record the memory at their start, taken after the calibration and before the engine:

  • available: free, inactive, speculative and purgeable pages, the same count the speed test already used;
  • the memory of the open programs, wired memory, the compressor and cached files.

On a 24 GB Mac this decides whether a 15-19 GB build fits: oMLX's guard refused the 27B with 10 GB left to it. The results table gains an "Available at start" column (a range when an engine has several runs; blank for runs made before this), and the published README explains it.

25 tests pass.

🤖 Generated with Claude Code

…ee at its start

The GPU calibration ran in the harness's own process before the engine started, and MLX kept the ~3.5 GB it
used cached there for the rest of the run (mx.clear_cache() empties the cache, but the process keeps its
pages): every agent run and speed test so far had about 3.5 GB of mostly zero- and one-filled buffers held
beside the engine on a 24 GB Mac. The calibration now runs in a process of its own that ends before the
engine starts; the harness stays at 0.03 GB, and the numbers measured are the same (18.9 TFLOPS and 136 GB/s,
against 19.0 and 136 before).

Runs and speed tests now record the memory at their start, after the calibration and before the engine:
what macOS could hand out (free, inactive, speculative and purgeable pages, as the speed test already
counted it), and the memory of the open programs, wired memory, the compressor and cached files. On a 24 GB
Mac that decides whether a 15-19 GB build fits (oMLX's guard refused the 27B with 10 GB left to it), so the
results table shows it ("Available at start"), and the published README explains it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@audenvenn
audenvenn merged commit bc77dfb into main Nov 17, 2026
audenvenn added a commit that referenced this pull request Nov 17, 2026
…#27) (#28)

- README: macOS and the open programs held about 7-10 GB on our Mac, not 5-6 GB, and
  solvetime's calibration kept ~3.5 GB during every run before 2026-11-18 (fixed in #27).
  raceline's 1.45x gap may be smaller than measured; it was not remeasured.
- 35B results page: the same correction in "Machine"; a note on the defect and its likely
  larger cost to raceline; "memory taken" reads low for every engine, so compare footprints
  (RSS for llama.cpp).

Co-authored-by: Claude Opus 5.5 <[email protected]>
audenvenn added a commit that referenced this pull request Nov 21, 2026
…the pi-LoRA page reads low (#54)

The maintainer's #85 ①: notes only, no records changed.

Both readings were taken the moment solvetime's GPU calibration process had ended, before macOS released the
memory that process had used. That memory stays wired for about a second (2.1 GB in a test on 2026-11-21), so
"estimated available before launch" reads low:
- 27B page: wired memory at launch 5.3-6.5 GB against about 2.4-2.8 GB at idle, so roughly 2.5-4 GB low. The
  speed table's "Memory taken (system)" counts from the same reading and reads low by about as much.
- pi-LoRA page: roughly 3-3.7 GB low. The four runs carry about the same offset, so their order stands.

The anonymous-memory readings are not affected, and the engines started seconds after the release. solvetime #53
now reads the memory after the release. The 35B page predates the per-run reading (#27); its own calibration
defect is already described on it.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant