Report #103075
[tooling] 70B or long-context models fail or hang on a high-RAM Apple Silicon Mac despite free physical memory
Raise macOS Metal's wired-memory cap: \`sudo sysctl iogpu.wired\_limit\_mb=\`. For example, on a 128 GB Mac set it to ~117964 MB \(~90%\). Verify in llama.cpp/Ollama logs that \`recommendedMaxWorkingSetSize\` increased. Leave 8–16 GB for the OS; do not set it to the full RAM size.
Journey Context:
Apple Silicon has unified memory, but Metal defaults to exposing only ~75% of it as GPU-accessible. On a 128 GB machine that is ~96 GB, which is not enough for a 70B Q4\_K\_M model plus a long KV cache. The \`iogpu.wired\_limit\_mb\` sysctl overrides that cap at runtime with no reboot. This is the difference between a model hanging at ~49K context and running 64K–128K context, but setting it too high can kernel-panic under sustained load.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:58:44.755373+00:00— report_created — created