Below is a pragmatic cheat-sheet for running local, open-weight LLMs on a Mac mini with an (eventual/rumoured) M-series “Pro” chip and 64 GB of unified memory. The same numbers hold almost 1-to-1 for any of the current M2 Pro/M3 Pro machines; an M4 Pro will simply do it faster ⚡️.
─────────────────────────────
- How much model can 64 GB handle?
─────────────────────────────
Apple Silicon uses unified RAM, so the CPU, GPU, and Neural Engine all pull from the same pool. You therefore want the on-disk (i.e. quantized) size of the model to stay < 55 GB to leave head-room for the OS, batching, and context windows.
Rule of thumb with llama.cpp / Ollama quantizations:
• Q2_K, Q3_K → ~0.5 bytes / parameter
• Q4_K → ~0.6 bytes / parameter
• Q5_K → ~0.8 bytes / parameter
• Q6/8-bit → 1.0 – 1.2 bytes / parameter
That means:
| Base model | Param | 4-bit size | 5-bit size | 8-bit size |
|---|
| Llama-2-7B | 7 B | 3-4 GB | 5-6 GB | 9-10 GB |
| Llama-2-13B | 13 B | 6-7 GB | 9-10 GB | 16-17 GB |
| Llama-2-34B | 34 B | 20-21 GB | 27-28 GB | 40-41 GB |
| Llama-2-70B | 70 B | 40-45 GB | 55-56 GB | ~80 GB* |
*70B @ 8-bit is too big; 4-bit fits, 5-bit squeaks by but don’t expect large batch sizes.
───────────────
2. Recommended models
───────────────
(✅ = comfortably fits; ⚠️ = fits but tight; ❌ = not realistic)
| Model family (chat tuned) | 4-bit | 5-bit | 8-bit | Notes |
|---|
| Llama 2-7/13/34B | ✅ | ✅ (except 34B@5-bit) | ✅ 7/13B | |
| Llama 2-70B | ✅ | ⚠️ | ❌ | |
| CodeLlama-34B | ✅ | ⚠️ | ❌ | great for coding tasks |
| Mistral-7B (Instruct) | ✅ | ✅ | ✅ | very fast |
| Mixtral-8x7B | ✅ | ⚠️ | ❌ | MoE, performs like 40-50B |
| Yi-34B (chat) | ✅ | ⚠️ | ❌ | strong multilingual |
| Vicuna-33B, Alpaca, etc. | ✅ | ✅ | ⚠️ | |
| Google Gemma-7B | ✅ | ✅ | ✅ | Apache 2.0 license |
| TinyLlama-1.1B / Phi-2 | ✅ | ✅ | ✅ | “feels instant” |
In practice, people settle on:
• Mistral-7B Q5_K or Q6_K → 70–120 tok/s
• Mixtral-8x7B Q4_K_M → 30–50 tok/s
• Llama-2-70B Q4_K_M → 7–12 tok/s (adequate for tinkering, not blazing)
───────────────
3. The three easiest runtimes
───────────────
-
Ollama (zero-config, Metal backend auto-enabled)
brew install ollama
# Pull and run Mistral 7B in one step
ollama run mistral
-
llama.cpp (build once, then use every .gguf)
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp && make LLAMA_METAL=1
./main -m ~/models/mixtral-8x7b-instruct.Q4_K_M.gguf -p "Explain transformers in two sentences"
-
MLX (Apple’s research team; Pythonic, uses NE + GPU)
pip install mlx-lm
mlx-lm download mistralai/Mixtral-8x7B-Instruct-v0.1
mlx-lm chat mistralai/Mixtral-8x7B-Instruct-v0.1
───────────────
4. Suggested “getting started” menu
───────────────
• General chat / creative writing → Mixtral-8x7B-Instruct Q4_K_M
• Multilingual / translation → Yi-34B Q4_K_S (needs ~24 GB RAM)
• Coding assistant → CodeLlama-34B-Instruct Q4_K_M (or, lighter, DeepSeek-Coder-6.7B)
• Fast lightweight on-device → Mistral-7B-Instruct Q5_K_M
───────────────
5. Performance tuning tips
───────────────
- Set environment variable to pin Metal GPU:
LLAMA_METAL_ROPE_SCALING=1 (if using long context)
- Batch-size matters more than raw parameters; experiment with ‑ngl N to split GPU/CPU load.
- Keep the terminal free of Rosetta: build and run everything as native arm64 (no
arch -x86_64).
- Disable macOS “App Nap” for long-running generation jobs.
- Fan curves: Macs are silent by default; sustained 100 % GPU will warm things up—consider a cooling pad for marathon sessions.
───────────────
6. Fine-tuning / LoRA on 64 GB
───────────────
• QLoRA on a 7–13B base is trivial; 34B fits if you drop learning rate schedulers onto CPU.
• Use PEFT + bitsandbytes 4-bit with the flag bnb_4bit_compute_dtype=torch.bfloat16.
• On 70B you’ll likely hit CPU OOM; use Colab/AWS for actual param-efficient fine-tunes and then just run the merged .gguf locally.
───────────────
7. Bottom line
───────────────
With 64 GB unified memory you can:
✅ Run any 7–34 B model at comfy 5- or 8-bit
✅ Run most 70 B models at 4-bit (tolerable speed)
✅ Chat, code, translate in real-time on Mistral-7B / Mixtral-8x7B
⚠️ Fine-tune up to ~34 B, beyond that outsource training
…and all of it works today on M2/M3 Pro chips; an M4 Pro will merely raise the token-per-second ceiling.
Happy local LLM hacking! 🧑💻🦙