-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow MPT models to return attention weights #599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a simple unit test for this?
This error should be noted if you plan to use it. |
Updated an existing unit test to check attention. |
Yeah. I am aware of that flash attention won't return attention weights. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment to make sure we're returning the right shape of stuff, but otherwise lgtm! Thanks for the PR!
Co-authored-by: Daniel King <[email protected]>
@lorabit110 could you run |
Previously, output_attentions is not propagated to the attention layer. Even when it's set to True, no attention weights were returned.