QwenLM / Qwen-VL

The official repo of Qwen-VL (通义千问-VL) chat & pretrained large vision language model proposed by Alibaba Cloud.
Other
4.27k stars 327 forks source link

[BUG] <'Only Support Self-Attention Currently' Assert Error> #413

Open GuiQuQu opened 3 weeks ago

GuiQuQu commented 3 weeks ago

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

当前行为 | Current Behavior

visual.py:192 assert Error

assert torch.allclose(query, key), 'Only Support Self-Attention Currently'

I use qwen-vl-7b-int4 model for few_shot inference, get this error, I guess this is precision problem.

期望行为 | Expected Behavior

No response

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:Ubuntu 20.04
- Python:3.10.14
- Transformers:4.32.0
- PyTorch:2.1.2
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):12.1

备注 | Anything else?

No response

GuiQuQu commented 3 weeks ago

I get another message in my debug try, I find some value in model will be nan in my inference,but the occurrence of this issue is probabilistic. in my vscode debug mode, no problem, but if I run python code by cmd,This will happen. problem happen picture