Open raoxinyi opened 1 year ago
操作系统版本:Ubuntu 20.04 LTS python版本:3.10.9 transformers安装的时候没有指定版本,安装的是最新4.24.0版 (base) root@st-desktop:~/xxy/Chinese-LangChain# python -m pip list |grep transformers sentence-transformers 2.2.2 transformers 4.24.0
部分报错信息如下: │ │ │ /root/anaconda3/lib/python3.10/importlib/init.py:126 in import_module │ │ │ │ 123 │ │ │ if character != '.': │ │ 124 │ │ │ │ break │ │ 125 │ │ │ level += 1 │ │ ❱ 126 │ return _bootstrap._gcd_import(name[level:], package, level) │ │ 127 │ │ 128 │ │ 129 _RELOADING = {} │ │ :1050 in _gcd_import │ │ :1027 in _find_and_load │ │ :1006 in _find_and_load_unlocked │ │ :688 in _load_unlocked │ │ :883 in exec_module │ │ :241 in _call_with_frames_removed │ │ │ │ /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a7 │ │ 56e07698483872c5c070eee/modeling_chatglm.py:30 in │ │ │ │ 27 ) │ │ 28 from transformers.modeling_utils import PreTrainedModel │ │ 29 from transformers.utils import logging │ │ ❱ 30 from transformers.generation.logits_process import LogitsProcessor │ │ 31 from transformers.generation.utils import LogitsProcessorList, StoppingCriteriaList, Gen │ │ 32 │ │ 33 from .configuration_chatglm import ChatGLMConfig │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ModuleNotFoundError: No module named 'transformers.generation'
请教大家
已解决,安装了transformers的4.27.1版本后,不再报错
哥, 你怎么安装的, 环境不冲突吗?
操作系统版本:Ubuntu 20.04 LTS python版本:3.10.9 transformers安装的时候没有指定版本,安装的是最新4.24.0版 (base) root@st-desktop:~/xxy/Chinese-LangChain# python -m pip list |grep transformers sentence-transformers 2.2.2 transformers 4.24.0
部分报错信息如下: │ │ │ /root/anaconda3/lib/python3.10/importlib/init.py:126 in import_module │ │ │ │ 123 │ │ │ if character != '.': │ │ 124 │ │ │ │ break │ │ 125 │ │ │ level += 1 │ │ ❱ 126 │ return _bootstrap._gcd_import(name[level:], package, level) │ │ 127 │ │ 128 │ │ 129 _RELOADING = {} │ │:1050 in _gcd_import │
│ :1027 in _find_and_load │
│ :1006 in _find_and_load_unlocked │
│ :688 in _load_unlocked │
│ :883 in exec_module │
│ :241 in _call_with_frames_removed │
│ │
│ /root/.cache/huggingface/modules/transformers_modules/THUDM/chatglm-6b-int4-qe/977d9df4cfae6b7a7 │
│ 56e07698483872c5c070eee/modeling_chatglm.py:30 in │
│ │
│ 27 ) │
│ 28 from transformers.modeling_utils import PreTrainedModel │
│ 29 from transformers.utils import logging │
│ ❱ 30 from transformers.generation.logits_process import LogitsProcessor │
│ 31 from transformers.generation.utils import LogitsProcessorList, StoppingCriteriaList, Gen │
│ 32 │
│ 33 from .configuration_chatglm import ChatGLMConfig │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'transformers.generation'
请教大家