Open PolarisRisingWar opened 1 year ago
为啥不用 CUDA_VISIBLE_DEVICES=0, cpu就写CUDA_VISIBLE_DEVICES=-1
不是,比如说我之前保存到卡1上了,我现在设置CUDA_VISIBLE_DEVICES=0了,如果不设置map_location的话,它还是会默认调用到卡1上,但是我现在就没有卡1了,就会报错
get, fixed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)
Is your feature request related to a problem? Please describe.
我遇到的问题是在textgen/gpt/gpt_model.py第359行,因为我保存的设备(双卡)和加载的设备(单卡)不同,我改成
adapters_weights = torch.load(checkpoint_name,map_location="cpu")
后能够正常运行Describe the solution you'd like
我的建议是开放一个可以输入设备的接口,或者直接就放CPU上算了
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional Information
Other things you want the developers to know.