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
As discussed in #1291, I think adding an argument to dot_product_attention (and sub-functions of it) to pass a custom normalization function would allow greater flexibility to the library.
One use-case of this would be passing the entmax function (https://github.com/deep-spin/entmax-jax) to build sparse transformers. Another use case is passing the identity function to extract the unnormalized attention weights (and doing the normalization outside).
What do you think? (ping @avital due to the previous discussion)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As discussed in #1291, I think adding an argument to
dot_product_attention
(and sub-functions of it) to pass a custom normalization function would allow greater flexibility to the library.One use-case of this would be passing the entmax function (https://github.com/deep-spin/entmax-jax) to build sparse transformers. Another use case is passing the identity function to extract the unnormalized attention weights (and doing the normalization outside).
What do you think? (ping @avital due to the previous discussion)
Beta Was this translation helpful? Give feedback.
All reactions