You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
transformers=4.43.3
python=3.8
Linux
Who can help?
@ArthurZucker
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
transformers/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py
Lines 667 to 675 in f739687
some experts directly forward with zero tokens and therefore the input shape is like [0, seq_length, hidden_states], and fails on log2()
The issue could be solved by checking the number of tokens before Line 675
if current_state.shape[0] == 0: continue
Expected behavior
No more forwarding with zero tokens.
The text was updated successfully, but these errors were encountered: