
Apple silicon Macs are increasingly popular for local AI because of their unified memory and fast internal storage. AirLLM on macOS takes advantage of both. This guide explains what is supported, how to install it, and how to get the best results from an M-series MacBook, Mac mini or Mac Studio.
What macOS support means
AirLLM's original workflow targets NVIDIA GPUs through CUDA. On macOS, it instead uses Apple's MLX framework, designed specifically for Apple silicon. The project's documentation keeps things simple: install AirLLM and run the same code you would use on Linux. Only Apple silicon is supported; Intel-based Macs are not.
Why Apple silicon suits AirLLM
- Unified memory: the CPU and GPU share one memory pool, so there is no separate VRAM limit and no copying between system and graphics memory.
- Fast internal SSDs: Apple's storage typically delivers several gigabytes per second, which directly improves AirLLM throughput.
- Quiet efficiency: long batch jobs run without the heat and noise of a gaming desktop.
Requirements
| Item | Recommendation |
|---|---|
| Chip | Any Apple M-series (M1 or newer) |
| Unified memory | 16 GB minimum, 32 GB or more preferred |
| Storage | Internal SSD with ample free space |
| Python | 3.10 or 3.11, native arm64 build |
Make sure you are using an arm64 Python rather than an x86 build running under Rosetta. Check with python -c "import platform; print(platform.machine())"; it should print arm64.
Installation
python3 -m venv ~/airllm-env
source ~/airllm-env/bin/activate
pip install -U pip
pip install airllm mlx
If you prefer the source code, download the ZIP from our download section, extract it and install with pip install -e . from the air_llm folder.
A first script
import mlx.core as mx
from airllm import AutoModel
model = AutoModel.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
ids = model.tokenizer(["Suggest a name for a small coffee shop."],
return_tensors="np", truncation=True, max_length=128)
out = model.generate(mx.array(ids["input_ids"]), max_new_tokens=30,
use_cache=True, return_dict_in_generate=True)
print(out)
Note two differences from CUDA examples: there is no .cuda() call, and the input IDs are wrapped in an MLX array. The macOS example notebook in the repository shows the same pattern; consult it if a future version changes the expected input type.
Storage tips for Mac users
Internal storage on many Macs is limited and expensive to upgrade. Large models can quickly consume hundreds of gigabytes. Options include:
- Using a Thunderbolt NVMe enclosure, which can approach internal SSD speeds.
- Setting
delete_original=Trueafter confirming a model works, to remove the original download. - Choosing compressed shards to reduce their size.
- Pointing the Hugging Face cache at an external drive with the
HF_HOMEenvironment variable.
Avoid slower USB 3 hard drives and network storage, which make generation painfully slow.
Managing heat and power
MacBooks may reduce performance during sustained workloads, particularly fanless models. For long jobs, keep the laptop plugged in, place it on a hard surface with good airflow and prevent sleep with caffeinate -i python your_script.py. A Mac mini or Mac Studio is better suited to extended runs.
Choosing models on a Mac
With unified memory, a Mac with 32 GB or more can often run medium models comfortably even without airllm. AirLLM becomes valuable when you want models that exceed your unified memory, such as 70B models on a 16 GB or 24 GB machine. Start with 7B to 14B models to confirm your setup, then move to larger ones.
Troubleshooting on macOS
- Import errors for MLX: confirm you are on Apple silicon and using arm64 Python.
- Slow performance: check that shards are on the internal SSD or a fast Thunderbolt drive.
- Disk full during splitting: free space or redirect the shard path.
- Gated model errors: accept the model licence on Hugging Face and supply your token.
Unified memory and how it changes the picture
On a PC, AirLLM's main job is to work around a small, separate pool of graphics memory. On Apple silicon, the GPU draws from the same unified memory as the rest of the system. That has two consequences. First, a Mac with plenty of memory can hold more of the model at once, and the operating system's file cache can keep recently used shards in memory, which speeds up repeated passes. Second, memory pressure from other applications affects AirLLM directly, so closing heavy apps such as browsers with many tabs, video editors and virtual machines gives AirLLM more room and better performance.
Choosing models by Mac configuration
| Unified memory | Comfortable without AirLLM | Where AirLLM helps |
|---|---|---|
| 8–16 GB | Small models up to about 7B (quantized) | 14B–70B models |
| 24–36 GB | Models up to about 14B–30B (quantized) | 70B models at original precision |
| 64 GB and above | Many 70B quantized models | Very large MoE models |
The pattern is consistent: AirLLM extends your reach to the model size just beyond what your memory holds comfortably.
Monitoring performance on macOS
Activity Monitor provides everything you need. The Disk tab shows read throughput while layers stream; sustained high reads indicate AirLLM is working as intended. The Memory tab's pressure graph should stay green or yellow; red pressure means the system is swapping, which competes with AirLLM for disk bandwidth and slows everything. The GPU History window, available from the Window menu, shows bursts of GPU activity as each layer is computed. If disk reads are low and the GPU is idle, check where your shards are stored and whether another process is using the drive.
Check unified memory and storage under load
Open Activity Monitor before launching the first AirLLM test and look at the Memory tab. Record memory pressure and swap use with the applications you normally keep open. Unified memory is shared by the CPU, the GPU and the rest of the system, so the amount printed on the box is only the upper bound. A machine that looks comfortable at idle can have less headroom while running a browser, an editor and a model together.
Use a short prompt for the initial test and cap the number of tokens the model can generate. Keep the first run separate in your notes because preparation can involve reading checkpoint files and producing local shards. When you repeat the same prompt, check whether memory pressure stays stable and whether swapping increases during generation. An occasional rise in memory use is easier to accommodate than sustained pressure accompanied by a slow or unresponsive desktop.
If both the checkpoint and the operating system use the internal drive, leave room for swap as well as model files. A nearly full drive can make testing misleading. If you move weights to an external SSD, connect it before launching the process and confirm that macOS has mounted it at the expected path. Eject it only when the process has finished reading and writing files. A disconnected or renamed volume can look like a missing cache and trigger preparation work again.
Test once with only the terminal and monitoring tools open, then repeat with your usual applications. The first run shows what the dedicated system can handle. The second tells you what to expect during the day. Log the model revision, prompt length, output limit and whether the model was read from an internal or external volume. Report memory pressure alongside elapsed time so you can explain severe slowdowns that a simple throughput figure would hide.
If a different Mac is available, compare using the same model and prompt before changing any settings. Look at the timing of a short completion as well as the responsiveness of other applications while it runs. A smaller model that completes within the time you can spare may be better suited to an interactive workflow than the largest checkpoint you can load. For batch work, test whether the machine can stay awake and finish two consecutive runs without intervention.
Keep a short setup note with the Python environment, AirLLM and MLX versions and the directory used for the model. When an update changes behaviour, create a fresh environment and repeat the baseline while you still have the working one. That makes it possible to identify whether an issue began with a software update or with a change to the model files. Check the macOS section of the AirLLM README before relying on options shown for other backends. A parameter that appears in a CUDA example may have different support on Apple silicon.
For everyday use, save one representative prompt along with a simple acceptance test. A document summary might need to include three known facts and stay under a fixed length. Keep the source document unchanged when comparing runs. This gives you a practical way to judge the trade between model size, speed and system responsiveness rather than relying solely on successful loading.
Frequently asked questions
Yes, on Apple silicon Macs with M-series chips. AirLLM uses the MLX framework on macOS, and the code you write is the same as on Linux.
No. The macOS path supports Apple silicon only. Intel Macs lack the MLX backend AirLLM relies on.
Any M-series Mac works, but more unified memory and a larger internal SSD help most. Apple internal SSDs are fast, which suits AirLLM disk-heavy workload.
You can, but use a fast Thunderbolt or USB4 NVMe enclosure. Slower external drives sharply reduce generation speed.
Conclusion
AirLLM on macOS turns an Apple silicon Mac into a capable platform for exploring models larger than its memory. Install a native arm64 Python, add AirLLM and MLX, keep shards on fast storage and manage heat for long runs. The same Python code you would write on Linux works here, making it easy to move projects between machines. For a wider view of platforms, see the compatibility section on our home page.


