ColossalAI icon indicating copy to clipboard operation
ColossalAI copied to clipboard

how to wrapped multiple models with booster

Open feixiang7701 opened this issue 2 years ago β€’ 4 comments

Discussed in https://github.com/hpcaitech/ColossalAI/discussions/5595

If two models need to be trained, and they use different optimizers. One model is a large model, which can't be loaded with single card, and the other is a small model to assist the training of the large model, but it also needs parameter update, how to warp each model through booster. The original boost api only support warp wtih single nn.Module, so how to solve trained multi model with boost?

Uploading 1.png…

feixiang7701 avatar Apr 24 '24 09:04 feixiang7701

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


Title: boost wrapped multiple models

Issues-translate-bot avatar Apr 24 '24 09:04 Issues-translate-bot

Hi, Thanks for the issue. I think there's nothing stopping you from calling booster.boost separately on the two models, as long as you want to apply the same parallel plan. Otherwise, you can create another booster with a lower parallelization degree for the smaller model.

Edenzzzz avatar Apr 28 '24 12:04 Edenzzzz

Thanks

feixiang7701 avatar Apr 30 '24 01:04 feixiang7701

I have the same promblem...

wangqiang9 avatar Aug 23 '24 03:08 wangqiang9