-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] RuntimeError: Internal: could not parse ModelProto from chatglm3-6b/tokenizer.model #3103
Comments
🤖 The error message "RuntimeError: Internal: could not parse ModelProto from chatglm3-6b/tokenizer.model" suggests that there is an issue with loading the tokenizer model for the To resolve this issue, follow these steps:
If after following these steps the issue persists, it might be helpful to look for any specific documentation or community posts related to loading the To load the
Here's a summary of the key configurations from your context: MODEL_ROOT_PATH = "" # Set this to your models' directory path
LLM_MODELS = ["chatglm3-6b", "zhipu-api", "openai-api"] # chatglm3-6b is already set as the default model
LLM_DEVICE = "auto" # Adjust if necessary for your hardware
MODEL_PATH = {
"llm_model": {
"chatglm3-6b": "THUDM/chatglm3-6b",
# other models...
},
# other model configurations...
} Ensure you have the For more information, you can refer to the model_config.py.example file in the Langchain-Chatchat repository. Sources
|
你模型是在hf下载的么,是不是模型没全 |
对,是不全的问题,重新下解决了 |
兄弟,你是怎么解决的呀,我也出现这个问题了 |
兄弟怎么重新下呀?跟着文档重新来一遍吗?还需要初始化吗? |
哥们,我遇到了同样的问题,你试试重新上传一下tokenizer.model能不能解决。 |
同问,怎么个不全法啊,我重新下了很多次了 |
本质是没有git lfs,安装一下就好了。https://git-lfs.com/ |
我也遇到了这个问题,llama3预训练,比较过tokenizer json文件的sha256sum,完全一致,说明数据完整性没问题,不需要重新下载的
|
运行 python startup.py -a
报错:
==============================Langchain-Chatchat Configuration==============================
操作系统:Linux-4.18.0-2.4.3.kwai.x86_64-x86_64-with-glibc2.27.
python版本:3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0]
项目版本:v0.2.10
langchain版本:0.0.354. fastchat版本:0.2.35
当前使用的分词器:ChineseRecursiveTextSplitter
当前启动的LLM模型:['chatglm3-6b', 'zhipu-api', 'openai-api'] @ cpu
{'device': 'cuda',
'host': '0.0.0.0',
'infer_turbo': False,
'model_path': 'chatglm3-6b',
'model_path_exists': True,
'port': 20002}
{'api_key': '',
'device': 'auto',
'host': '0.0.0.0',
'infer_turbo': False,
'online_api': True,
'port': 21001,
'provider': 'ChatGLMWorker',
'version': 'glm-4',
'worker_class': <class 'server.model_workers.zhipu.ChatGLMWorker'>}
{'api_base_url': 'https://api.openai.com/v1',
'api_key': '',
'device': 'auto',
'host': '0.0.0.0',
'infer_turbo': False,
'model_name': 'gpt-4',
'online_api': True,
'openai_proxy': '',
'port': 20002}
当前Embbedings模型: bge-large-zh-v1.5 @ cpu
==============================Langchain-Chatchat Configuration==============================
2024-02-28 08:16:53,771 - startup.py[line:655] - INFO: 正在启动服务:
2024-02-28 08:16:53,771 - startup.py[line:656] - INFO: 如需查看 llm_api 日志,请前往 /home/ouyangzhichao/Langchain-Chatchat/logs
/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: 模型启动功能将于 Langchain-Chatchat 0.3.x重写,支持更多模式和加速启动,0.2.x中相关功能将废弃
warn_deprecated(
2024-02-28 08:17:01 | INFO | model_worker | Register to controller
2024-02-28 08:17:01 | ERROR | stderr | INFO: Started server process [3160451]
2024-02-28 08:17:01 | ERROR | stderr | INFO: Waiting for application startup.
2024-02-28 08:17:01 | ERROR | stderr | INFO: Application startup complete.
2024-02-28 08:17:01 | ERROR | stderr | INFO: Uvicorn running on http://0.0.0.0:20000 (Press CTRL+C to quit)
2024-02-28 08:17:01 | INFO | model_worker | Loading the model ['chatglm3-6b'] on worker 05c9ab76 ...
2024-02-28 08:17:02 | ERROR | stderr | Process model_worker - chatglm3-6b:
2024-02-28 08:17:02 | ERROR | stderr | Traceback (most recent call last):
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
2024-02-28 08:17:02 | ERROR | stderr | self.run()
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/multiprocessing/process.py", line 108, in run
2024-02-28 08:17:02 | ERROR | stderr | self._target(*self._args, **self._kwargs)
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/Langchain-Chatchat/startup.py", line 389, in run_model_worker
2024-02-28 08:17:02 | ERROR | stderr | app = create_model_worker_app(log_level=log_level, **kwargs)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/Langchain-Chatchat/startup.py", line 217, in create_model_worker_app
2024-02-28 08:17:02 | ERROR | stderr | worker = ModelWorker(
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/fastchat/serve/model_worker.py", line 77, in init
2024-02-28 08:17:02 | ERROR | stderr | self.model, self.tokenizer = load_model(
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/fastchat/model/model_adapter.py", line 348, in load_model
2024-02-28 08:17:02 | ERROR | stderr | model, tokenizer = adapter.load_model(model_path, kwargs)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/fastchat/model/model_adapter.py", line 816, in load_model
2024-02-28 08:17:02 | ERROR | stderr | tokenizer = AutoTokenizer.from_pretrained(
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 801, in from_pretrained
2024-02-28 08:17:02 | ERROR | stderr | return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2029, in from_pretrained
2024-02-28 08:17:02 | ERROR | stderr | return cls._from_pretrained(
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2261, in _from_pretrained
2024-02-28 08:17:02 | ERROR | stderr | tokenizer = cls(*init_inputs, **init_kwargs)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/.cache/huggingface/modules/transformers_modules/THUDM/chatglm3-6b/9addbe01105ca1939dd60a0e5866a1812be9daea/tokenization_chatglm.py", line 109, in init
2024-02-28 08:17:02 | ERROR | stderr | self.tokenizer = SPTokenizer(vocab_file)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/.cache/huggingface/modules/transformers_modules/THUDM/chatglm3-6b/9addbe01105ca1939dd60a0e5866a1812be9daea/tokenization_chatglm.py", line 18, in init
2024-02-28 08:17:02 | ERROR | stderr | self.sp_model = SentencePieceProcessor(model_file=model_path)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/sentencepiece/init.py", line 468, in Init
2024-02-28 08:17:02 | ERROR | stderr | self.Load(model_file=model_file, model_proto=model_proto)
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/sentencepiece/init.py", line 961, in Load
2024-02-28 08:17:02 | ERROR | stderr | return self.LoadFromFile(model_file)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | File "/home/ouyangzhichao/anaconda3/lib/python3.11/site-packages/sentencepiece/init.py", line 316, in LoadFromFile
2024-02-28 08:17:02 | ERROR | stderr | return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
2024-02-28 08:17:02 | ERROR | stderr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 08:17:02 | ERROR | stderr | RuntimeError: Internal: could not parse ModelProto from chatglm3-6b/tokenizer.model
前置步骤都按照要求搞了,求大佬帮忙看看
The text was updated successfully, but these errors were encountered: