Skip to content

[Engine] macOS / Metal: open contributions, rebased on v0.2.6 #4128

Open

Description

@mnott

Title: [Engine] macOS / Metal: open contributions, rebased on v0.2.6

This issue lists our open pull requests for Strata on Apple Silicon (Metal), all rebased on v0.2.6 and validated there. Each PR is self-contained and can be reviewed and merged on its own.

PR Area What it changes Why it matters on a Mac
#4126 Engine Sampling on the Metal decode path: temperature, top-k, top-p, min-p, penalties and a Philox seed (CUDA's sampler is the reference); a sampled verify window keeps a draft token only when the sample equals it. The server gives every sampled request a seed. The Metal port decoded greedily only, so temperature had no effect. In agent use that produced word-for-word repetition loops. Greedy output is unchanged.
#3876 Engine Wrap a Gyro file without its PLE table: map only the head and tail ranges the GPU reads. Gyro-M: wrapped 91.97 GB as 2 overlapping buffers becomes wrapped 37.57 GB as 2 separate ranges, leaving room for a second model or other work.
#4127 Engine Metal decode and prompt kernels for the pair-trellis expert types TQP5/TQP6/TQP7 (GGML types 147-149), the 256-expert router, a CPU reference and parity tests. These are the types docs/GYRO.md names as the reason Gyro-L is not supported, and the ones the Gyro Coder files use. v0.2.6 cannot load such a file on a Mac; with this PR Gyro Coder-L runs (about 114 tok/s greedy decode here).
#3231 Engine Conversation cache on macOS: checkpoints validate and park on Metal, the memory guard reads available RAM, K/V is described for snapshots, the session fingerprint and restore accept what this engine saves. v0.2.6 skips parking on Metal (invalid checkpoint running-state payload); returning to an 18k-token conversation took 11.3 s, with this PR 0.95 s (restored from the cache in 24 ms). Two concurrent agent conversations on one server (40-task coding set each): 692-1081 s per run without it, 238-380 s with it.
#3960 Serve Tool-call parsing: coerce parameters by declared type and recover the damaged forms Qwen3-coder-style models write (<=param> openers, </NAME> closers, a parameter name fused with its value, stray stubs). Fewer failed tool calls and retries in agent runs.
#4125 Other Test fix: serve/test_server.py::VisionArgs::test_min_tokens_is_passed_only_when_set fails on v0.2.6 ('Proc' object has no attribute 'pid'). serve/test_server.py runs without failures again, so a real regression is not hidden behind a known one.
#3176 GUI Web app layout follows the window: wide windows use the space, narrow screens stack. Readability of the monitor and chat in wide windows and side panels.

Closed: #3299 (Gyro on Metal). Its kernel work is upstream since v0.2.2/v0.2.3 (672fd99 and following); its remaining commits continue in #3231 and #3876.

How we run Gyro on a Mac

Validation

Apple Silicon, 128 GB unified memory, Gyro-M TQ2_0 (Gyro Coder-L TQ3_0 for #4127): greedy output bit-exact against v0.2.6 (against the same stack without the PR for #4127, since v0.2.6 cannot load the file), decode speed within 2 %, and for sampling seed 1 != seed 2 / seed 1 == seed 1. Details and the exact revision are in each PR.

Activity

  1. mnott commented on Oct 25, 2026

    @mnott
    ContributorAuthor

    Gyro-L on a Mac: verified with #4127, details in #4127 (pack, flags, a correct greedy answer, first decode run 35.5 tok/s).

  2. mnott commented on Oct 25, 2026

    @mnott
    ContributorAuthor

    Gyro-L decode speed on Apple Silicon (128 GB unified memory), greedy, 256 tokens, 3 runs each, --spec 2 with the MTP draft, expert cache 64:

    Build tok/s GPU buffers peak RSS drafts accepted
    this PR alone (on v0.2.6) 76.5 (first, cold) / 101.4 / 97.1 wrapped 108.32 GB as 2 overlapping buffers 60.4 GB 162 of 166
    this PR + #3876 (PLE wrap), --ple-io direct 106.4 / 106.4 / 106.1 wrapped 53.92 GB as 2 separate ranges 61.3 GB 160 of 168

    The 35.5 tok/s in my previous comment was a single cold 80-token run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions