yanqiangmiffy / Chinese-LangChain

中文langchain项目|小必应,Q.Talk,强聊,QiangTalk
2.68k stars 323 forks source link

ModuleNotFoundError: No module named 'transformers_modules.' #43

Open cweihua opened 1 year ago

cweihua commented 1 year ago

Traceback (most recent call last): File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\main.py", line 26, in application = LangChainApplication(config) File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\clc\langchain_application.py", line 24, in init self.llm_service.load_model(model_name_or_path=self.config.llm_model_name) File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\clc\gpt_service.py", line 55, in load_model self.tokenizer = AutoTokenizer.from_pretrained( File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 663, in from_pretrained tokenizer_class = get_class_from_dynamic_module( File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\dynamic_module_utils.py", line 399, in get_class_from_dynamic_module return get_class_in_module(class_name, final_module.replace(".py", "")) File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\dynamic_module_utils.py", line 177, in get_class_in_module module = importlib.import_module(module_path) File "D:\Ksoftware\python39\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named 'transformers_modules.' 运行python main.py发生这样的错误,应该怎么解决

yizefan commented 1 year ago

ModuleNotFoundError: No module named 'transformers_modules.'缺少这个模块