Skip to content

Correct stale block-size-512 performance claims - #280

Merged
neuromechanist merged 11 commits into
devfrom
feature/issue-216-doc-claims
Aug 23, 2026
Merged

neuromechanist merged 11 commits into
devfrom
feature/issue-216-doc-claims

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Partially addresses #216 (documentation half; the block-size sweep remains open).

Every affected claim compared PyTorch-MPS/Metal to CPU or MLX using numbers measured at the old block_size=512 default, without stating that condition, while block_size moved to 8192 in #229. #216's sweep on the bundled 32-channel sample shows the PyTorch-Metal/MPS backend is far more block-size-sensitive than CPU or MLX, so "PyTorch-MPS never wins" does not generalize; MLX stays the fastest Apple backend at every block size measured.

Rework (this update): paper.md no longer cites a GitHub issue — both "pamica issue 216" references were replaced with a pointer to the project documentation, and the sweep evidence itself was moved into docs/guides/validation.md (a new "Block-size sensitivity" subsection) so that citation resolves to real content. The paper's framing was also inverted: MLX is now stated as the reason the backend exists (the more efficient Apple-GPU path), with PyTorch-Metal's block-size sensitivity as the supporting detail, not the headline. A follow-up audit caught two more issues, also fixed here: the multi-model MPS claims in AGENTS.md and docs/guides/validation.md were the same confounded class (measured at block_size=512, never re-swept at 8192) and were left unqualified in the first pass; and the further-tuned "13.5 ms/iteration" figure needed a memory caveat everywhere it appears, since that setting puts the whole 30504-frame sample in one block and is not a size-independent win (paper.md also had a 30/30.5 rounding collision with the unrelated native-Fortran figure two lines above, now fixed).

Corrected claims

AGENTS.md:65-76 before: "PyTorch-MPS never wins (162-255 ms/it, at or worse than CPU)" and "Multi-model MLX (#81) also wins (~5x over torch-CPU; MPS still loses)", both unqualified.
AGENTS.md:65-76 after: single-model figures qualified with block_size=512 and the #216 sweep (431 to 30.5 ms/it at the 8192 default, still behind CPU's 21.7; 13.5 ms/it beating CPU's 15.8 only at a memory-limited single-block extreme); the multi-model claim now states it was measured at the inherited 512 and has not been re-swept at 8192.

docs/guides/backends.md:40-54 before: same "PyTorch-MPS does not win (162-255 ms/iteration, at or worse than CPU)" without a block-size qualifier.
docs/guides/backends.md:40-54 after: states block_size=512 as the condition, adds the #216 sweep numbers (including the 8192-default CPU/MPS pair and the single-block memory caveat), and cross-links the new validation-guide subsection.

docs/guides/validation.md:323-408 before: "PyTorch-MPS is not a win... so use MLX" and "MPS still losing" (multi-model), both following a table already labeled block_size=512 but not carrying that qualifier into the conclusion; no dedicated sweep section existed.
docs/guides/validation.md:323-408 after: both conclusions now state block_size=512 explicitly and cite #216; a new "Block-size sensitivity" subsection carries the full sweep table (measurement conditions, all four block sizes, the LL-invariance check, and the single-block memory caveat) with provenance to issue #216; the multi-model conclusion notes that configuration is untested at 8192.

paper.md:83 before: "MLX exists because PyTorch's Metal backend is slower than the CPU on Apple hardware" cited to "pamica issue 216".
paper.md:83 after: "MLX exists because it is the more efficient path on Apple GPUs: PyTorch's Metal backend trails MLX across the entire block-size sweep, and at pamica's shipped defaults trails even the CPU it runs beside" -- no issue citation, links the documentation instead.

paper.md:122-128 before: "255 ms for PyTorch-Metal, which never beats the CPU it runs beside", corrected in the first pass to cite "pamica issue 216" with a 30/30.5 rounding collision against the native-Fortran figure.
paper.md:122-128 after: states block_size=512, gives the 8192-default pair (30.5 vs CPU's 21.7) and the single-block pair (13.5 vs CPU's 15.8) with the memory caveat, lands on "MLX stays the fastest Apple backend throughout the sweep", and points to the documentation link already used two lines later -- no issue citation anywhere in the file.

Evidence

All replacement numbers are from #216's block_size sweep table (Apple M4 Pro, bundled 32-channel sample, float32, n_mix=3, pdftype=0, seed 42, warm) and its own log-likelihood-unchanged confirmation (-3.43856 to six significant digits across all four block sizes), not new measurements. No numbers were invented; the multi-model 70-channel table and the single-model 70-channel EEG numbers in docs/guides/validation.md/paper.md were left as originally measured, now labeled block_size=512 and stated as unswept at the current default rather than rescoped without data.

Out of scope (left for #216's remaining work)

Test plan

  • uv run pytest -m "not slow" -n auto -- 410 passed, 24 skipped, 1 xfailed
  • uv run ruff check . and uv run ruff format --check . -- clean
  • uv run ty check -- clean
  • typos -- clean
  • Docs-only change; no code touched
  • paper.pdf rebuilt by CI on push (Draft PDF workflow) after each paper.md change

@neuromechanist
neuromechanist merged commit df6b3ad into dev Aug 23, 2026
9 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-216-doc-claims branch August 23, 2026 18:35
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