#856·minimind

如果在 Mac 上直接运行 Python trainer/train_pretrain.py 而不做任何修改,它将完全在 CPU 上运行,无法调用 Mac 的 GPU。

作者: wangchong2023创建于 2026年9月15日更新于 2026年9月16日

II. How to modify to enable MPS training on Mac (Apple Silicon)? If you want to use GPUs to train on Mac M-series chips (M1/M2/M3/M4), you only need to make the following small adjustments to trainer/train_pretrain.py : 1. Modify the device detection logic

内容来源: jingyaogong/minimind