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
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.
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 anoffload_folder
for them. Alternatively, make sure you havesafetensors
installed if the model you are using offers the weights in this format.Mac m1 ,在外接硬盘上面运行,hug 软连到电脑上,真实文件也是在外接硬盘上面