xusenlinzy / api-for-open-llm

Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
Apache License 2.0
2.31k stars 262 forks source link

运行glm4v请求报错 #311

Open 760485464 opened 1 week ago

760485464 commented 1 week ago

提交前必须检查以下项目 | The following items must be checked before submission

问题类型 | Type of problem

模型推理和部署 | Model inference and deployment

操作系统 | Operating system

Linux

详细描述问题 | Detailed description of the problem

Exception in thread Thread-2: Traceback (most recent call last): File "/root/anaconda3/envs/glm4v/lib/python3.9/threading.py", line 980, in _bootstrap_inner self.run() File "/root/anaconda3/envs/glm4v/lib/python3.9/threading.py", line 917, in run self._target(*self._args, *self._kwargs) File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context INFO: 172.16.18.52:54156 - "POST /v1/chat/completions HTTP/1.1" 200 OK return func(args, **kwargs) File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/transformers/generation/utils.py", line 2024, in generate result = self._sample( File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/transformers/generation/utils.py", line 3032, in _sample model_kwargs = self._update_model_kwargs_for_generation( File "/root/.cache/huggingface/modules/transformers_modules/glm-4v-9b/modeling_chatglm.py", line 1083, in _update_model_kwargs_for_generation model_kwargs["past_key_values"] = self._extract_past_from_model_output( TypeError: _extract_past_from_model_output() got an unexpected keyword argument 'standardize_cache_format' ERROR: Exception in ASGI application Traceback (most recent call last): File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/sse_starlette/sse.py", line 289, in call await wrap(partial(self.listen_for_disconnect, receive)) File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/sse_starlette/sse.py", line 278, in wrap await func() File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/sse_starlette/sse.py", line 228, in listen_for_disconnect message = await receive() File "/root/anaconda3/envs/glm4v/lib/python3.9/site-packages/uvicorn/protocols/http/httptools_impl.py", line 555, in receive await self.message_event.wait() File "/root/anaconda3/envs/glm4v/lib/python3.9/asyncio/locks.py", line 226, in wait await fut asyncio.exceptions.CancelledError: Cancelled by cancel scope 7f3a0f7c8e50

During handling of the above exception, another exception occurred:

Dependencies

image提示线程错误 尝试过切换torch版本无效

运行日志或截图 | Runtime logs or screenshots

image

760485464 commented 1 week ago

我切换torch2.3之后就无法启动成功