我在一个Docker容器中运行vlm,使用以下参数:["--quantization", "awq", "--enforce-eager", "--disable-custom-all-reduce", "--max-num-batched-tokens", "4096", "--max-model-len", "4096", "--model", "LoneStriker/Qwen1.5-7B-Chat-AWQ", "--host", "0.0.0.0", "--port", "8080", "--chat-template", "/chat_template/qwen1.5-7b-chat.jinja2"]
聊天模板:
{% for message in messages %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}
每2到3个查询,模型就会用换行符("
")填充所有剩余的补全标记。这种情况只发生在我向模型发送的消息数量大于1时,也就是说,如果我添加了一条消息历史记录。有人遇到过这种情况吗?我尝试不设置--enforce-eager
和--disable-custom-all-reduce
。我还注意到,在使用v0.3.0版本时,我会得到这些输出,就好像有人在调用模型一样:INFO 02-14 15:30:16 llm_engine.py:877] Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.0%, CPU KV cache usage: 0.0%
这可能无关紧要,但......
更新:我使用流式传输并设置vllm.entrypoints.openai.api_server
。
7条答案
按热度按时间fivyi3re1#
你可以在这里查看(QwenLM/Qwen2#46)
of1yzvn42#
我也遇到过这个问题。我使用vllm 0.3.1部署Qwen1.5-14V-chat,并使用chatml模板。
ebdffaop3#
同样遇到多了换行符的问题,有解决的吗? 感觉用代码移除换行符比较傻
yeotifhr4#
@cyc00518 感谢,这个问题中有没有可以提取的解决方案?也许可以将停用词设置为"
...",但我无法从中提取更多内容。
huwehgph5#
@cyc00518 感谢,这个问题中有没有可以提取的解决方案?也许可以将停用词设置为"
...",但我无法从中提取更多内容。
QwenLM/Qwen2#52 看一下这个
我在发送请求时通过添加
skip_special_tokens=False
解决了这个问题。ezykj2lf6#
@junjzhang 很酷,非常感谢,我会去查看的。
fkvaft9z7#
QwenLM/Qwen2#46 (comment)