accelerate 找不到模型
yata0 opened this issue · comments
Yata commented
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from accelerate import Accelerator
accelerator = Accelerator()
tokenizer = AutoTokenizer.from_pretrained("glm-large-chinese", trust_remote_code=True)
model = AutoModelForSeq2SeqLM.from_pretrained("glm-large-chinese", trust_remote_code=True)
model = accelerator.prepare(model)
我将glm-large-chinese
下载到当前目录下,单卡情况使用python test.py
可以正常load,
如果使用accelerator launch test.py
就无法正常运行,保错如下:
ModuleNotFoundError: No module named 'transformers_modules.glm-large-chinese.tokenization_glm'
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/huggingface/modules/transformers_modules/glm-large-chinese/modeling_glm.py'
请教一下这是什么问题?
wushuang commented
同样的问题。似乎THUDM/* 一系列模型都这样,试了下最新的chatGLM也是
Yu commented
Yata commented
@taofennanhai 感谢你的回答!想请问一下,Model是什么库
Yu commented
Yata commented
@taofennanhai 可以了,感恩的心!
wushuang commented
beginOfAll commented
@taofennanhai 感恩!折腾我好几天都问题,终于解决了!