mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3784] [Engine] Metal: Gyro-S resident mode wraps the whole 58.5 GB file and OOMs on a 64 GB Mac (docs: GPU maps 29.7 GB) #1592
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1592
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @namseokyoo on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3784
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Terminal (the
stratacommand)What happened
Launching Gyro-S with its default preset on a 64 GB Mac mini dies with a Metal GPU out-of-memory error after the model load (~585 s). Reproduced 3 times (2× via
strata launch, 1× manual start from the saved config).The default Gyro-S launch config is resident mode:
STRATA_METAL_STREAM=0+--spec 2+ MTP on. Engine log at the point of failure:The loader wraps the entire 58.5 GB single file — including the n-gram table region embedded in it — as GPU buffers. On a 64 GB Mac that exceeds what Metal can hold resident (maxBufferLength 41.75 GB), so the OOM is deterministic, not a headroom issue: raising
--vram-reserve-mib(1212 → 2560 → 3072, set directly in the saved config) does not change the outcome.What I expected: per
docs/MAC.md, Gyro-S is "one 58.5 GB file" of which "the file the GPU maps" is 29.7 GB, because "the file's other 28.8 GB is the n-gram table", which "is read from the SSD a few rows at a time and does not count against the memory above". The table lists Gyro-S as needing about 38 GB, "Recommended from 48 GB". So on a 64 GB Mac, resident mode should fit with room to spare — instead, the loader's wrap covers the table region too.This looks like a loader/docs mismatch specific to the single-file Gyro layout: with the GSQ packs the n-gram table is a separate file, so wrapping "the model file" naturally excludes it. It also explains why it may have gone unnoticed: on a 128 GB Mac the whole file fits, and on a 32 GB Mac the engine streams by default — only the 48–64 GB band that follows the Gyro preset into resident mode hits it.
Smallest steps or command that reproduce it
install.sh.strata launch --model gyro-sand accept the default preset (resident mode:STRATA_METAL_STREAM=0,--spec 2, MTP on).Reproduction status
Reproduced locally
Strata version
Strata 0.2.2 · engine 0.1.47 (0.1.47-macos-arm64-metal)
Graphics card, memory and system
Apple M5 Pro (16-core GPU, unified memory) · 64 GB RAM · macOS 27.0.1 (26A434), Mac mini, 1 TB SSD (700+ GB free)
Model, size and settings
Qwen3.8-Flash-Next Gyro-S (agentionai), single file
Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf, 58.5 GB · 32K context · pictures on · default presetLogs
Workaround
Forcing streaming mode starts and runs well on the same machine:
Additional notes
sysctl vm.swapusagewent from a 0 MB baseline to 2,362 MB used (cumulative swapouts 565,281) after the 3 attempts. Streaming runs of the same pack produce essentially no swapouts (Δ +3,420 pages over a full benchmark session), so the swap pressure comes from the resident wrap attempt itself.strata launch --set vram-reserve-mib=…did not persist the value into the saved config (editing the config file directly did).@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@namseokyoo commented on GitHub (Nov 7, 2026):
Retested on Strata 0.2.12 (engine/Control 0.1.58), Mac mini M5 Pro, 64 GB, Gyro-S pack, resident mode (profile without --mmap-experts and without STRATA_METAL_STREAM), 128K context, DFlash2 drafter. /reopen - the problem persists, though the failure moved:
What changed: the load-time OOM from the original report is gone. The loader now wraps the file successfully and the server reports ready:
mtl: wrapped 58.49 GB as 2 overlapping buffers (maxBufferLength 41.75 GB, overlap 0.54 GB)wrapped (58.5 GB), 131200 cells, PLE on, ready in 14716 msWhat still fails: the first generation request OOMs and the engine dies:
strata serve: 0 MiB of VRAM free with everything loaded - LOWmtl: command buffer failed: Insufficient Memory (00000008:kIOGPUCommandBufferCallbackErrorOutOfMemory)the engine stopped unexpectedly (exit code 5)Reproduced with the resident instance running alone on the machine (system memory ~90% free, no other Strata instance), so it is not contention with a second server. Streaming mode (--mmap-experts) on the same setup works fine and remains my production workaround.
So resident mode still is not usable on a 64 GB Mac: it loads, but it cannot generate. Happy to provide the full serve log if useful.