r/LLMDevs • u/Historical_Syrup_461 • 4d ago
Tools layerpool: fine-tune a model split across several machines, with the HF Trainer unchanged
most machines cant train or fine-tune the bigger models on their own, but a few of them together usually have enough memory. so i wrote a thing that splits the model by layers across them and trains it like its one model.
they connect over the internet, so it doesnt matter where each one is. you can even add notebooks from the services that give out free GPUs.
on one run it kicked the slowest device out halfway because it was holding the others back, and training just kept going on the rest without losing anything.
your training code stays the same. works for fine-tuning (LoRA, QLoRA, full) and for training from scratch, and mixes nvidia, amd, apple silicon and cpu.
https://github.com/abdallah-swe/layerpool
feedback welcome