Skip to content

roton v0.3.0 — Chunked Metal 3 / MPP prefill

Choose a tag to compare

@github-actions github-actions released this 30 Nov 04:24
· 9 commits to main since this release

roton v0.3.0 adds chunked prompt prefill to real GGUF inference on Apple Silicon. Pass --prefill-batch 64 to process a prompt with Metal 3 or Metal 4 / MPP FP16 matrix multiplication. Sequential prefill remains the default; decode and the final LM head keep the packed-weight GEMV path.

Download roton-macos-arm64.tar.gz and verify it with SHA256SUMS. No Cargo, Rust, Python or Xcode is required to run the binary.

./roton run SmolLM2-135M-Instruct-Q5_K_S.gguf "Your prompt here" \
  --max-tokens 32 --max-ctx 1024 --prefill-batch 64 --prefill-backend auto

The GPU expands one projection at a time into a reusable FP16 buffer. Chunked absolute-position RoPE, causal GQA and KV writes connect prefill to subsequent decode. Total prefill scratch is capped at 512 MiB. auto uses the compiled MPP pipeline when available and falls back to Metal 3; metal3 and mpp can be selected explicitly for chunked prefill.

Measured on Apple M5 Pro, 48 GiB, macOS 26.6.2, SmolLM2-135M-Instruct Q5_K_S. Median of five runs after one warmup; model-side prefill only, excluding process startup and model loading:

Prompt tokens Sequential Metal 3 batch 64 MPP batch 64
5 25.22 ms 30.17 ms 20.74 ms
117 501.49 ms 53.43 ms 32.77 ms
453 4433.88 ms 204.37 ms 132.25 ms

Raw measurements, memory caveats and reproduction script. These compare paths within roton; there is no same-condition llama.cpp or MLX comparison yet. Short inputs may not benefit, as the 5-token Metal 3 result shows.

Validation covers 19 workspace tests, all nine supported matrix types, CPU-reference causal attention, chunk boundaries and subsequent decode. Q8_0, Q4_K_M, Q5_K_M and Q5_K_S each matched their sequential 32-token continuation on the smoke-test prompt. FP16 changes rounding and can change generated tokens on other inputs. Validation details.

Validated model scope remains SmolLM2-135M-Instruct. Native packed INT4 MPP, flash attention, general Qwen/MoE support and Thunderbolt multi-Mac execution remain planned.