modelscope / swift

ms-swift: Use PEFT or Full-parameter to finetune 250+ LLMs or 35+ MLLMs. (Qwen2, GLM4, Internlm2, Yi, Llama3, Llava, MiniCPM-V, Deepseek, Baichuan2, Gemma2, Phi3-Vision, ...)
https://github.com/modelscope/swift/blob/main/docs/source/LLM/index.md
Apache License 2.0
2.13k stars 205 forks source link

多模态部署用多卡部署成功,但是调用的时候报错,改为单卡没问题。 #1237

Open lukywangwang opened 2 days ago

lukywangwang commented 2 days ago

INFO: 2024-06-26 18:05:52,881 deploy.py:390] {'request_id': 'chatcmpl-02b663b161ee459ca5dbed15b57751a8', 'model': 'glm4v-9b-chat', 'messages': [{'role': 'user', 'content': "What to do if I can't fall asleep at night?"}], 'generation_config': GenerationConfig({'max_new_tokens': 256}), 'seed': None, 'stop': [], 'stream': False} INFO: fdbd:dc02:2a:616::21:50080 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi result = await app( # type: ignore[func-returns-value] File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in call return await self.app(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/starlette/routing.py", line 72, in app response = await func(request) File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/fastapi/routing.py", line 296, in app content = await serialize_response( File "/mnt/bn/zc-model-nas-lq/anaconda3/envs/swift_train/lib/python3.10/site-packages/fastapi/routing.py", line 155, in serialize_response raise ResponseValidationError( fastapi.exceptions.ResponseValidationError: 1 validation errors: {'loc': ('response', 'choices', 0, 'finish_reason'), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}