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
{{ message }}
Repository navigation
Qwen3: IndexError: index 12 is out of bounds for dimension 0 with size 8 #5
For the Qwen3-4B model: model.config.num_key_value_heads = 8 model.config.num_attention_heads = 32
This configuration causes the order variable to contain values up to 31. However, the reshaped q_weight tensor only has a dimension size of 8 for num_key_value_heads. Attempting to access index 12 in q_weight[order, :, :] triggers the IndexError since the first dimension is out-of-bounds.
Request
Could you please advise how to modify the code to properly handle Qwen's grouped-query attention architecture?
Activity