r/MachineLearning • u/Historical_Syrup_461 • 2d ago
Project layerpool: fine-tuning one model across mixed devices [P]
layerpool splits a transformers model by its layers across mixed devices (NVIDIA, AMD, Apple Silicon, CPUs) and trains it with the normal HF Trainer.
The main machine runs the training loop and keeps the embeddings and the head. Each block is replaced by a stand-in that sends the hidden state through the devices and brings the gradient back, so autograd and the Trainer don't see the split.
- Devices can be on different networks
- Layers are split by each device's memory and speed, and moved while training runs
- If a device drops out, the others take its layers and replay the lost steps from checkpoints
It's bound by the network, so it's for memory, not speed.
4
Upvotes