Disclosure: This engineering guide reflects SiliconBench hardware testing on Apple M4 Mac mini (16GB). See our Japanese Home or Privacy & Disclosure Policy for editorial standards.

Setting Up External NVMe Storage for Local LLMs on M4 Mac mini (16GB)

Key Takeaways
  • On a 256GB or 512GB Mac mini, 7–15 GB quantized weights and ~/.cache/huggingface duplicates quickly starve the free internal space macOS needs for swap.
  • Apple Silicon does not support USB 3.2 Gen 2x2 (20Gbps); 20Gbps enclosures silently fall back to 10Gbps. Buy USB4 / Thunderbolt 4 (40Gbps) if you switch models often.
  • Keep macOS, swap, SQLite WAL files, and Python/Node toolchains on the internal SSD; offload GGUF/MLX weights, HF_HOME, and archived logs onto an APFS-formatted external NVMe drive.

1. Why the Internal SSD Fills Up First

If you run local language models on an Apple Silicon Mac mini, you will hit storage limits before compute limits. Even a compact 27B Q2 model such as Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf takes 7.37 GiB on disk. Testing a handful of 8B–14B variants alongside MLX conversions easily consumes 50–100 GB, while Hugging Face clients quietly duplicate weights inside ~/.cache/huggingface.

This hits 16GB machines especially hard. Because macOS caps Metal GPU working memory at 12.42 GiB on a 16GB M4 Mac mini, running a large model alongside normal tools leaves tight headroom and relies on internal SSD swap when memory pressure spikes. Keeping at least 50 GB free on the internal volume protects overall system responsiveness.

2. The Recommended Storage Split

Data Category Recommended Volume Why
macOS, Swap, SQLite WAL, Python/Node virtualenvs Internal SSD Low random-I/O latency and immune to accidental USB disconnects
GGUF / MLX weights & HF_HOME cache External APFS NVMe SSD Sequential multi-gigabyte reads; easily relocated with one environment variable
Rotated agent logs & benchmark archives External APFS NVMe SSD Prevents multi-month background jobs from exhausting system disk space
# Redirect Hugging Face downloads to your external APFS volume
export HF_HOME="/Volumes/YourNVMe/hf-cache"
mkdir -p /Volumes/YourNVMe/models /Volumes/YourNVMe/hf-cache

# Serve a model stored on the external NVMe drive
llama-server \
  -m /Volumes/YourNVMe/models/Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf \
  --alias bonsai-2.5-27b -ngl 99 -fa on -c 12288 --cache-ram 0 \
  --host 127.0.0.1 --port 8080

3. Avoiding the USB 3.2 Gen 2x2 (10Gbps) Trap

Many portable SSDs advertise "up to 2,000 MB/s" over USB 3.2 Gen 2x2 (20Gbps). However, Apple Silicon Macs (M1 through M4) do not support the dual-lane Gen 2x2 specification and silently negotiate down to USB 3.2 Gen 2 (10Gbps).

Enclosure / Interface Spec Real Link Ceiling on Mac Best Fit for Local LLMs
USB 3.2 Gen 2 (10Gbps) 10 Gbps Budget archival storage and occasional single-model use
USB 3.2 Gen 2x2 (20Gbps) 10 Gbps (Fallback) Avoid for Mac-only workflows; you pay for unused 20Gbps lanes
USB4 / Thunderbolt 4 (40Gbps) 40 Gbps Recommended when swapping 7–15 GB models frequently

After connecting any drive, check System Information under USB / Thunderbolt to verify the negotiated link speed rather than trusting box marketing.

4. Formatting & Operational Safety (APFS & mmap)

Three External-Drive Pitfalls to Prevent
  • Format as APFS, not exFAT: Factory exFAT lacks journaling and risks corruption during sudden disconnects. Use Disk Utility to format Mac-dedicated LLM drives as APFS.
  • Never unplug or sleep mid-inference: Runtimes like llama-server memory-map (mmap) weight files directly from disk. A disconnect crashes the process immediately; use rear ports and stop inference before ejecting.
  • Watch enclosure thermals: Sustained 40Gbps transfers during model downloads or conversions heat compact enclosures rapidly. Favor finned aluminum USB4 cases with thermal pads and decent airflow.

5. Frequently Asked Questions (FAQ)

Can I use a USB 3.2 Gen 2x2 (20Gbps) enclosure at full speed on an Apple Silicon Mac mini?

No. Apple Silicon Macs (M1 through M4) do not support USB 3.2 Gen 2x2, so a 20Gbps-rated enclosure silently falls back to USB 3.2 Gen 2 (10Gbps). For fast multi-gigabyte model switching, choose a USB4 or Thunderbolt 4 enclosure rated at 40Gbps.

Why format the external SSD as APFS instead of exFAT?

APFS is native to macOS and handles metadata, journaling, and active workloads cleanly. exFAT lacks journaling and is far more fragile if an external drive disconnects or loses power while hosting models or logs.

Where should Python, Node, and SQLite databases live?

Keep macOS, swap, SQLite WAL files, and Python/Node virtual environments on the internal SSD. They are small, sensitive to random I/O latency, and must not disappear if an external enclosure is disconnected.

What happens if the external drive disconnects or the Mac sleeps mid-inference?

Many local LLM servers memory-map (mmap) model files directly from disk. Unplugging the cable or letting the drive sleep during active inference causes an immediate I/O crash. Stop the server and eject cleanly in Finder first.

How do I stop Hugging Face downloads from filling my internal SSD again?

Export HF_HOME to a folder on your external NVMe drive (for example /Volumes/YourNVMe/hf-cache) in your shell profile so new weights bypass ~/.cache/huggingface.