-
Notifications
You must be signed in to change notification settings - Fork 492
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
[Feature] internlm2_5-20b-chat支持吗?我部署后能跑起来,但输出一团糟 #2366
Comments
支持。 |
##lmdeploy check_env
TorchVision: 0.19.0+cu121 Legend: X = Self |
因为我是集成在langchain ChatOpenAI中使用的: ChatOpenAI( |
因此我只能提供lmdeploy的INFO日志: INFO: 10.1.150.105:36416 - "POST /v1/chat/completions HTTP/1.1" 200 OK |
但INFO日志中没办法看到模型产生的输出结果(不清楚是模型本身没输出,还只是INFO日志没有打印出输出) |
然后我通过langsmith来跟踪: ValueError('No generations found in stream.')Traceback (most recent call last): File "/root/.virtualenvs/test/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 603, in generate File "/root/.virtualenvs/test/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 825, in _generate_with_cache File "/root/.virtualenvs/test/lib/python3.10/site-packages/langchain_openai/chat_models/base.py", line 534, in _generate File "/root/.virtualenvs/test/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 107, in generate_from_stream ValueError: No generations found in stream. |
发现可能是stream的问题,然后设置streaming=False,可以跑出结果来,但又发现错误: lmdeploy/model.py", line 515, in messages2prompt 推测应该是我的应用里有tool_call , 并返回了langchain的ToolMessage,里面的role = 'tool' |
所以,我们与openai的一致性兼容到底是哪些一致,还有哪些不一致呢? |
通过修改:lmdeploy/model.py,增加tool = "tool" `
` 终于可以跑起来了 |
再多运行几个测试,又发现很多问题,没办法继续了...... |
目前的 tool 功能只支持了 stream=False. |
我也發現了一樣的錯誤KeyError: 'tool'
在最後一行出錯 如果無法ToolMessage 2024-08-30 09:50:21 INFO: 172.18.0.1:36578 - "POST /v1/chat/completions HTTP/1.1" 200 OK |
@William4711 这个错误看起来是传入了一个 |
ToolMessage來自於Langchain 所以llama3.1應該是角色ipython來搭配程序呼叫回覆使用 |
@William4711 could you help check the PR #2558? |
This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 5 days if the stale label is not removed or if there is no further response. |
This issue is closed because it has been stale for 5 days. Please open a new issue if you have similar issues or you have any new updates now. |
Motivation
internlm2_5-20b-chat支持
Related resources
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: