irlab-sdu / fuzi.mingcha

夫子•明察司法大模型是由山东大学、浪潮云、中国政法大学联合研发,以 ChatGLM 为大模型底座,基于海量中文无监督司法语料与有监督司法微调数据训练的中文司法大模型。该模型支持法条检索、案例分析、三段论推理判决以及司法对话等功能,旨在为用户提供全方位、高精准的法律咨询与解答服务。
Apache License 2.0
236 stars 17 forks source link

ModuleNotFoundError: No module named 'transformers_modules.fuzi' #3

Open APTXZwei opened 9 months ago

APTXZwei commented 9 months ago

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("/content/drive/MyDrive/fuzi.mingcha/fuzi.mingcha-v1.0", trust_remote_code=True) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/tokenization_auto.py", line 719, in from_pretrained tokenizer_class = get_class_from_dynamic_module(class_ref, pretrained_model_name_or_path, **kwargs) File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 497, in get_class_from_dynamic_module return get_class_in_module(class_name, final_module.replace(".py", "")) File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 199, in get_class_in_module module = importlib.import_module(module_path) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'transformers_modules.fuzi'

zwh-sdu commented 9 months ago

Hi APTXZwei,

Thank you for bringing this to our attention. We have identified that model path should not contain '.'. To resolve this issue, you can simply remove the '.' from the model parameter path. Additionally, we have updated the model name on Hugging Face.