Qwen2.5
Qwen2.5 copied to clipboard
[BUG] Qwen1.5-14B回答不会停止,会自动进行对话,或者出现重复回答
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
- [X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
- [X] 我已经搜索过FAQ | I have searched FAQ
当前行为 | Current Behavior
采用本库给的cli_demo.py或者web_demo.py启动都会遇到该问题
期望行为 | Expected Behavior
希望能得到正确回答,如上图只需要回答“你好!有什么我可以帮助你的吗?”以及重复的只回答一遍
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
- OS:Ubuntu22.04
- Python:3.10
- Transformers:4.39.1
- PyTorch:2.21
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):12.1
备注 | Anything else?
No response
还会有这样的提示:
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask
to obtain reliable results.
Setting pad_token_id
to eos_token_id
:151643 for open-end generation.
Please try using the code from QwenLM/Qwen1.5 (the current repo).
Please try using the code from QwenLM/Qwen1.5 (the current repo).
I met the same question using code from QwenLM/Qwen1.5.
遇到了同样的问题
I suspect that you are using base model instead of chat model? Use Qwen1.5-14B-Chat and follow the example code
我也遇到同样的问题,但是切换到chat版本就没有问题。。。
Opt for chat models instead, as base models lack the chat template functionality. Their primary application revolves around text completion leveraging in-context learning.