-
Notifications
You must be signed in to change notification settings - Fork 139
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: You are trying to offload the whole model to the disk. Please use the disk_offload
function instead.`
#9
Comments
初学者,还请见谅 |
Hi, can you try the solution here: huggingface/accelerate#2726? |
第一次出现这个问题,修改的部分如下:
结束程序并未做任何修改,又再一次重新在conda虚拟环境的控制台输入python trans_web_demo.py运行程序,和上次运行同样的步骤,同样的环境,同样的代码,又报了如下这个错误:
|
你好,我们更新了模型的modeling_chatglm.py以及github中的trans_web_demo.py,请试一下更新之后是否还有问题? |
非常真诚的表达感谢,我是新手,还望见谅,提的问题可能会比较简单且奇怪,实在是抱歉。我会再次尝试,并及时反馈。
|
请问怎么解决的,我也是这个问题,有没有最后能run的码,第一次玩这个,求带 |
(ht240815) PS G:\project\ht\240815\LongWriter> python .\trans_web_demo.py Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<?, ?it/s] Traceback (most recent call last): File "G:\project\ht\240815\LongWriter\trans_web_demo.py", line 59, in <module> model, tokenizer = load_model_and_tokenizer(MODEL_PATH, trust_remote_code=True) File "G:\project\ht\240815\LongWriter\trans_web_demo.py", line 49, in load_model_and_tokenizer model = AutoModelForCausalLM.from_pretrained( File "F:\Tool\Anaconda3\envs\ht240815\lib\site-packages\transformers\models\auto\auto_factory.py", line 564, in from_pretrained return model_class.from_pretrained( File "F:\Tool\Anaconda3\envs\ht240815\lib\site-packages\transformers\modeling_utils.py", line 4015, in from_pretrained dispatch_model(model, **device_map_kwargs) File "F:\Tool\Anaconda3\envs\ht240815\lib\site-packages\accelerate\big_modeling.py", line 496, in dispatch_model raise ValueError( ValueError: You are trying to offload the whole model to the disk. Please use the
disk_offloadfunction instead.
昨晚还一切正常,运行起来了,同样的代码,啥也没动,今个一直报这个。下面是transformers的版本:
> pip show transformers Name: transformers Version: 4.44.0 Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow Home-page: https://github.com/huggingface/transformers Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors) Author-email: [email protected] License: Apache 2.0 License Location: f:\tool\anaconda3\envs\ht240815\lib\site-packages Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm Required-by: peft
The text was updated successfully, but these errors were encountered: