Dimension out of range (expected to be in range of [-3, 2], but got 3)
#13
by
oshyshko
- opened
I am trying to run the model locally on macos/m4 by strictly following the instructions in README.
I am getting this error when trying to run the first Python code example:
File "/Users/john/work/venv/lib/python3.13/site-packages/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py", line 272, in forward
attn_output = F.scaled_dot_product_attention(q, k, v, attention_mask, dropout_p=0.0)
IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)
Any ideas on how to fix it?
P.S. the only diverge from the README I have is that I needed to change inputs = inputs.to("cuda")
to inputs = inputs.to("mps")
to make it pass this point.