-
Notifications
You must be signed in to change notification settings - Fork 255
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] chat模板不支持自定义的role #1572
Comments
所有llm模型的chat template都在model.py中定义。不太清楚qwen的function call是怎样的模板,如果你清楚的话,能不能麻烦给提个PR支持下? |
lmdeploy 默认支持 stateful inference(interactive mode)。不好直接复用 apply_chat_template。 |
建议在messages2prompt方法中 对role 进行判断,如果 role !=user /assistant /system ,则直接使用用户传过来的 role,这样更加通用 |
@RunningLeon could you help supporting the thorough chat template of qwen and check the |
建议可以在messages2prompt方法中 对role 进行判断,如果 role !=user /assistant /system ,则直接使用用户传过来的 role,这样更加通用 |
@shell-nlp |
OK @shell-nlp |
输出发现 在Observation 处并没有停止。 |
同理。如果 问题 是: 你是谁, stop 设置为通义千问,仍然无法停止。
输出为: 我是通义千问,由阿里云开发的AI助手。我被设计用来回答各种问题、提供信息和进行对话。有什么我可以帮助你的吗? |
如果stop_word encode之后,token的个数超过1,lmdeploy是不支持的。 |
能否进行后处理来解决这个问题,测试vllm的时候,是不存在这个问题的, 而且token的个数超过1 ,比较常见,很多时候,我们输入的stop_str 就是需要多个token才能表示 |
引擎里面不好整。这个需求我们短期内还没有计划,现在的功能需求已经排到6月底了。很抱歉 |
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. |
Checklist
Describe the bug
我需要使用function /Observation 作为 角色 来进行工具调用,但是报错。
而且我使用qwen1.5 14B 实验的时候,stop=["Observation:"] 模型输出无法stop
Reproduction
chat
Environment
Error traceback
No response
The text was updated successfully, but these errors were encountered: