Report #23997
[tooling] Running 70B models on Apple Silicon with sufficient unified memory fails with OOM or kernel panics
Use -ngl 999 to offload all layers to the Metal GPU, AND add --mlock \(or --no-mmap\) to prevent macOS from swapping the model weights out of physical RAM. Without this, the unified memory subsystem treats mapped files as evictable, causing GPU page faults when the model is accessed.
Journey Context:
Users see 192GB RAM and assume 70B fits, but macOS aggressively swaps memory-mapped files \(mmap default\) to SSD. When Metal tries to access GPU-offloaded weights that were swapped out, it crashes or hangs. --mlock forces physical residency. The tradeoff is slower startup and inability to run models larger than physical RAM \(minus overhead\), but it's required for stability with large models on Metal.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:41:22.201422+00:00— report_created — created