Skip to content

docs: the MLX drafting retention reproduced and bounded; gemma4 resize/#28954 record; parked upstream draft - #311

Merged
glennneuber merged 9 commits into
mainfrom
docs/leak-repro-0341
Sep 18, 2026
Merged

glennneuber merged 9 commits into
mainfrom
docs/leak-repro-0341

Conversation

@glennneuber

Copy link
Copy Markdown

Record of the 2026-09-18 investigation that followed the v0.34.1 deploy — docs only, no code.

  • Task doc, "The drafting retention, reproduced and bounded": the deterministic reproducer (an image + a stop-terminated answer + speculative decoding; grammar irrelevant; 14/14 on a size ladder, 0/38 length-terminated), the exclusion list — each item excluded by an instrumented Go-only swap (live-array registry by owning scope, per-bucket byte accounting, creation/close counters by schedule owner), not by reading — with the one n = 1 error corrected in place, and the two-component finding: A, MLX-tracked and owned by nothing on the Go side, the only unbounded growth, removed by no-drafting; B, CUDA-internal and outside MLX's allocator, driven by input-shape variety, present without drafting, bounded (peaks +6.6 GiB early, ~4 GiB at steady state over 60 shapes; the trie fills to its 8 GiB budget as in MLX runner: ~0.147 GiB resident growth per request at fixed context, plateauing at ~28.5 GiB (0.32.15) ollama/ollama#17924).
  • Task doc, gemma4 sections: the bilinear→bicubic resize entered with the 0.33.1 fold (llama.cpp #27594) unflagged; the veto on the e2b/e4b attribution closed by a repeat on the deployed 0.34.0 image (identical cell for cell), so every gemma4 move in this fold is #28335's, whose E2B/E4B carve-out is the mechanism; llama.cpp #28954 (the same commit's abort above ~1.2 Mpx) does not reach the fork because the launcher passes -b N -ub N, at the cost of a split non-causal decode at the top rung — with the measurement that decides a fix.
  • Retirement register: rows for the launcher's batch vs. the gemma4 image chunk, and for the drafting knob as memory mitigation.
  • upstream-mlx-speculation-image-stop-retention.md — PARKED: the ollama issue (reproducer, exclusions, evidence quality) and a note for ml-explore/mlx (the CUDA-internal accounting gap), held per the standing rule until a fix can be proposed.

Instrumented images sync-0.34.1-instr…instr6 and the wt-instr worktree stay on the host for re-runs; nothing of this is deployed.

🤖 Generated with Claude Code

glennneuber and others added 9 commits September 18, 2026 17:53
…unflagged; not in this fold's delta

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…54 — fork immune to the abort, split-decode cost noted; register row

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… exclusions by instrumented runs, device vs MLX accounting

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d B (CUDA-internal, shape variety); the knob removes A, not B

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n (ollama), CUDA-internal shape-variety growth (mlx)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tate); A is the only unbounded growth

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… cost, 1.5–1.9× prefill in one piece, 31b 9 px tier moves

Deployed 0.34.1 image, GPU0, think-off at the 8192 rung, two repeats per arm, both arms deterministic.
The split decode (batch 1024: 1024 + 40–76 tokens per image chunk) costs nothing the scored cells see;
one-piece decode (num_batch 2048) is 1.5× (31b) and 1.9× (26b-a4b) faster at prefill and moves 31b's
9 px fine-text tier 4 → 3. Register row: measured, decision pending.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…, geometry identical to the ROCm host

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@glennneuber
glennneuber merged commit a89dd5f into main Sep 18, 2026
1 check passed
@glennneuber
glennneuber deleted the docs/leak-repro-0341 branch September 18, 2026 11:45
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