FinGPT 报错信息如下,请指教,

hzbexzde  于 6个月前  发布在  其他
关注(0)|答案(1)|浏览(121)

Mac系统,CPU i7 内存16G,下载了001-007的文件;运行报错:

/Users/kongfanyu/Downloads/MyFinGPT/venv/bin/python /Users/kongfanyu/Downloads/MyFinGPT/fingpt/FinGPT-v3/test.py
Traceback (most recent call last):
File "/Users/kongfanyu/Downloads/MyFinGPT/fingpt/FinGPT-v3/test.py", line 13, in
model = AutoModel.from_pretrained(base_model, trust_remote_code=True, device_map="auto")
File "/Users/kongfanyu/Downloads/MyFinGPT/venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "/Users/kongfanyu/Downloads/MyFinGPT/venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3175, in from_pretrained
) = cls._load_pretrained_model(
File "/Users/kongfanyu/Downloads/MyFinGPT/venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3296, 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.

进程已结束,退出代码1

6qftjkof

6qftjkof1#

这个应该是GPU显存不足,所以转用内存进行推理。解决方案可以参考这里这里。不过,使用内存+CPU推理的话,速度可能会比较慢。

相关问题