Qwen2.5 icon indicating copy to clipboard operation
Qwen2.5 copied to clipboard

[BUG] Qwen1.5-14B回答不会停止,会自动进行对话,或者出现重复回答

Open Parasolation opened this issue 11 months ago • 6 comments

是否已有关于该错误的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启动都会遇到该问题 image image

期望行为 | 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

Parasolation avatar Mar 26 '24 08:03 Parasolation

还会有这样的提示: 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.

Parasolation avatar Mar 26 '24 09:03 Parasolation

Please try using the code from QwenLM/Qwen1.5 (the current repo).

jklj077 avatar Mar 28 '24 03:03 jklj077

Please try using the code from QwenLM/Qwen1.5 (the current repo).

I met the same question using code from QwenLM/Qwen1.5.

zhenfenxiao avatar Apr 01 '24 09:04 zhenfenxiao

遇到了同样的问题

wrl1224 avatar Apr 01 '24 11:04 wrl1224

I suspect that you are using base model instead of chat model? Use Qwen1.5-14B-Chat and follow the example code

JustinLin610 avatar Apr 06 '24 04:04 JustinLin610

我也遇到同样的问题,但是切换到chat版本就没有问题。。。

Riel1998 avatar Apr 08 '24 09:04 Riel1998

Opt for chat models instead, as base models lack the chat template functionality. Their primary application revolves around text completion leveraging in-context learning.

jklj077 avatar Apr 30 '24 08:04 jklj077