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

ValueError: The current device_map had weights offloaded to the disk. Please provide an offload_folder for them. Alternatively, make sure you have safetensors installed if the model you are using offers the weights in this format. #191

Open
klj123wan opened this issue Oct 12, 2023 · 0 comments

Comments

@klj123wan
Copy link

init model ...
Traceback (most recent call last):
File "/Volumes/D671087/Baichuan-13B/cli_demo.py", line 87, in
main()
File "/Volumes/D671087/Baichuan-13B/cli_demo.py", line 48, in main
model, tokenizer = init_model()
File "/Volumes/D671087/Baichuan-13B/cli_demo.py", line 13, in init_model
model = AutoModelForCausalLM.from_pretrained(
File "/Users/alexkong/anaconda3/envs/baichuan/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 560, in from_pretrained
return model_class.from_pretrained(
File "/Users/alexkong/anaconda3/envs/baichuan/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3307, in from_pretrained
) = cls._load_pretrained_model(
File "/Users/alexkong/anaconda3/envs/baichuan/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3428, in _load_pretrained_model
raise ValueError(
ValueError: The current device_map had weights offloaded to the disk. Please provide an offload_folder for them. Alternatively, make sure you have safetensors installed if the model you are using offers the weights in this format.

Mac m1 ,在外接硬盘上面运行,hug 软连到电脑上,真实文件也是在外接硬盘上面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant