yuanzhoulvpi2017 / zero_nlp

中文nlp解决方案(大模型、数据、模型、训练、推理)
MIT License
2.85k stars 355 forks source link

train model all error #131

Open yxk9810 opened 1 year ago

yxk9810 commented 1 year ago

hi, 我使用双卡运行模型并行,train_model_all.py
报错: ValueError: DistributedDataParallel device_ids and output_device arguments only work with single-device/Multi-devie gpu modules, but got device_ids[0],output_device 0,and module parameter {device(type='cuda',index=0),device(type='cuda',index=1)

Ardang666 commented 1 year ago

input 和 weight 不在同一个设备上的问题,定位到哪一个输入,把 input.to('cudu:1')上

87oo commented 1 year ago

遇到了同样的问题,请问题主解决了吗?

yuanzhoulvpi2017 commented 1 year ago

不知道你用的是哪一个模型,哪一个算法,不知道你具体修改了什么