ModuleNotFoundError: No module named 'transformers_modules.THUDM/chatglm3-6b
Author: ShanJianSoda
Pull request: no

### System Info

当我运行chatglm3的web_demo2.py时，发生错误
此时的配置环境为
When I run the web_demo2.py for chatglm3, an error occurs
In this case, the configuration environment is as follows:

torch = 2.1.0+cu121
Python = 3.11
transformers = 4.26.1

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "D:\ChatGLM3\ChatGLM3\web_demo2.py", line 28, in <module>
    tokenizer, model = get_model()
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 212, in wrapper
    return cached_func(*args, **kwargs)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 241, in __call__
    return self._get_or_create_cached_value(args, kwargs)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 267, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 321, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
File "D:\ChatGLM3\ChatGLM3\web_demo2.py", line 17, in get_model
    tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 676, in from_pretrained
    tokenizer_class = get_class_from_dynamic_module(class_ref, pretrained_model_name_or_path, **kwargs)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\dynamic_module_utils.py", line 443, in get_class_from_dynamic_module
    return get_class_in_module(class_name, final_module.replace(".py", ""))
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\dynamic_module_utils.py", line 164, in get_class_in_module
    module = importlib.import_module(module_path)
File "C:\Users\chenchen\AppData\Local\Programs\Python\Python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked

### Expected behavior

有无老哥帮忙鸭

Comments:
Hi @ShanJianSoda, thanks for raising an issue! 

Could you provide either a link to the web demo or a code snippet we could run to reproduce the error? 

thanks you, It's in this project. https://github.com/THUDM/ChatGLM3. 

:D

Thanks for sharing! This is an external library and so we're not responsible for its maintenance. You should raise an issue on that repo. 

Some suggestions from my side.
For transformers issue, maybe you should try the code in https://huggingface.co/THUDM/chatglm3-6b. It will load the model in your cache and you can debug on the web_demo from THU's repo.
And a note that the package required is `pip install protobuf transformers==4.30.2 cpm_kernels torch>=2.0 gradio mdtex2html sentencepiece accelerate`.

thanks, I have solved. 👍