Fine-tune models larger than your Mac's memory
The usual rule is that the model has to fit in memory to train. Paged Trainer breaks that rule for mixture-of-experts models. On an M5 Pro with 48 GB, a 270 GB Qwen3-Coder-480B fine-tuned with peak memory under 34 GB. A 132 GB Qwen3-235B ran at 63 tokens per second.
The trick is that LoRA leaves the base weights frozen. Frozen weights are read-only, so the experts can stay on the SSD and stream in every step, while the backbone and the adapters stay in memory. The planner sizes the batch and the expert cache to your Mac, and a memory guard backs off if macOS gets tight.
The numbers
| Model | Quant | Size on disk | Tokens/s | Peak memory | One epoch |
|---|---|---|---|---|---|
| Qwen3-Coder-Next | 6-bit | 64.7 GB | 123 | 29.9 GB | 4h 37m |
| Qwen3-235B-A22B | 4-bit | 132.2 GB | 63 | 31.5 GB | 9h 06m |
| Qwen3.8-Flash-Next | 6-bit | 148.0 GB | 61 | 29.3 GB | 9h 20m |
| GLM-4.7 | 4-bit | 198.6 GB | 24 | 31.4 GB | 23h 59m |
| Qwen3-Coder-480B | 4-bit | 270.1 GB | 24 | 33.9 GB | 1d 0h |
Every model in that table is bigger than the Mac's memory. Speed tracks SSD read speed, so keep big checkpoints on the internal drive.
FAQ
Is it really training, or just inference?
Real training. Forward and backward passes run every step and LoRA adapters update. The base weights stay frozen and read-only, which is what lets the experts live on the SSD.
What limits speed?
Mostly SSD read speed. Every step reads the expert weights, so the internal SSD is the fastest place for the checkpoint. The bench tab measures it on your own Mac.
Will it freeze my Mac?
It is built not to. The planner leaves room for the system, and a memory guard gives memory back under macOS pressure without changing the gradients.
Related
- Paged Trainer
- Fine-tune MoE models on a Mac
- Run 100 GB to 500 GB models on a Mac
- LoRA and QLoRA fine-tuning on Mac
© QWERTY Code LLC. Paged Trainer is a product of QWERTY Code LLC.