Repository navigation
[Blip2] Fix cross attention reshape - #46695
Conversation
|
[For maintainers] Suggested jobs to run (before merge) run-slow: blip_2, instructblip, instructblipvideo |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
CI Dashboard: View test results in Grafana |
| # NOTE: KV has a different bsz than Q so we take the broadcasted shapes instead of the input shape | ||
| attn_output = attn_output.reshape(*attn_output.shape[:2], -1).contiguous() | ||
| return attn_output, attn_weights |
There was a problem hiding this comment.
wait, isn't the bsz supposed to be same as queries? I'm not following how it came out a different bsz
There was a problem hiding this comment.
I thought so as well but I debugged and it apparently wasn't - and tbh I didn't want to go any deeper 😬
There was a problem hiding this comment.
And it seems to happen only on the granite model so very weird
There was a problem hiding this comment.
I didn't want to go any deeper
haha I feel it, as long as the slow CI passes for blips, granitevision, graniteaudio - lets merge then (hopefully I am not missing any models with qformer backbone)
There was a problem hiding this comment.
smth saying that the dummy tester inputs weren't prepared correctly to begin with, and we were lucky to not notice it 🙃
|
run-slow: blip_2, instructblip, instructblipvideo, granite4_vision, granite_speech, granite_speech_plus |
|
Just sanity checking again then merging 🫡 |
|
This comment contains models: ["models/blip_2", "models/granite4_vision", "models/granite_speech", "models/granite_speech_plus", "models/instructblip", "models/instructblipvideo"] |
|
Merging, all green and we need it to unblock tomorrow potentially |
As per title. It's a regression caused by #46401 (discovered it during #46039) where the cross attn final shape is not done properly (the root cause is that there oftentimes is some broadcasting going on between q and kv so the final shape is not "static").
Tbh, I'm not sure why this was even mergable with the merge queue as it is already indicated with fast test using granite speech plus.