Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.load()希望能够增加map_location #47

Open
2 tasks done
PolarisRisingWar opened this issue Jun 19, 2023 · 4 comments
Open
2 tasks done

torch.load()希望能够增加map_location #47

PolarisRisingWar opened this issue Jun 19, 2023 · 4 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@PolarisRisingWar
Copy link

  • I checked to make sure that this is not a duplicate issue
  • I'm submitting the request to the correct repository (for model requests, see here)

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.

@PolarisRisingWar PolarisRisingWar added the enhancement New feature or request label Jun 19, 2023
@shibing624
Copy link
Owner

为啥不用 CUDA_VISIBLE_DEVICES=0, cpu就写CUDA_VISIBLE_DEVICES=-1

@PolarisRisingWar
Copy link
Author

不是,比如说我之前保存到卡1上了,我现在设置CUDA_VISIBLE_DEVICES=0了,如果不设置map_location的话,它还是会默认调用到卡1上,但是我现在就没有卡1了,就会报错

shibing624 added a commit that referenced this issue Jun 20, 2023
@shibing624
Copy link
Owner

get, fixed.

Copy link

stale bot commented Dec 27, 2023

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.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)

@stale stale bot added the wontfix This will not be worked on label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants