shibing624 / MedicalGPT

MedicalGPT: Training Your Own Medical GPT Model with ChatGPT Training Pipeline. 训练医疗大模型,实现了包括增量预训练(PT)、有监督微调(SFT)、RLHF、DPO、ORPO。
Apache License 2.0
2.94k stars 452 forks source link

在单机多卡监督微调时使用的策略是DP还是DDP? #291

Open CNUIGB opened 6 months ago

CNUIGB commented 6 months ago

Describe the Question

Please provide a clear and concise description of what the question is. 如题,想请教一下这个问题。因为看到很多人说训练时需要300G内存,所以想肯定是将模型做了拆分,然后在训练,想问问这样的情况下,本项目的代码支持DDP的方式训练吗?

shibing624 commented 6 months ago
  1. 模型放显存就好,13B模型需要24G显存就可以;
  2. 支持ddp,torchrun开启多机多卡。