You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
使用的是标准的huggingface的脚本
from transformers import AutoTokenizer, AutoModel
import time,os
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True).half().cuda()
model = model.eval()
response, history = model.chat(tokenizer, "你好", history=[])
print(response)
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
print(response)
运行以后报错
ModuleNotFoundError: No module named 'transformers_modules.THUDM'
====================================================================
Python 版本 3.11。
查询的库版本如下:
accelerate 1.0.1
botorch 0.9.5
gpytorch 1.11
gradio 5.1.0
gradio_client 1.4.0
mdtex2html 1.3.0
protobuf 5.28.2
pytorch-lightning 2.1.2
sentencepiece 0.2.0
sse-starlette 2.1.3
streamlit 1.39.0
torch 2.5.0+cu124
torchaudio 2.5.0+cu124
torchmetrics 1.3.0.post0
torchvision 0.20.0+cu124
transformers 4.45.2
transformers_modules 0.4.0
查了好多论坛都没找到这个问题如何解决,在这里请教下
Beta Was this translation helpful? Give feedback.
All reactions