We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi! Thanks for the speedy reference implementation in Pytorch.
I noticed something odd: I think you're multiplying by D (in eq 4) not D^-1 in linear_attention:
linear_attention
def linear_attention(q, k, v): D_inv = torch.einsum('...nd,...d->...n', q, k.sum(dim = -2)) context = torch.einsum('...nd,...ne->...de', k, v) out = torch.einsum('...de,...nd,...n->...ne', context, q, D_inv) return out
The tensor named D_inv is actually D. Unless I'm missing something obvious, which hopefully I am.
D_inv
[tagging @ncilfone because we discussed this recently]
The text was updated successfully, but these errors were encountered:
🐛 🐝 🪲 🙏
Sorry, something went wrong.
No branches or pull requests
Hi! Thanks for the speedy reference implementation in Pytorch.
I noticed something odd: I think you're multiplying by D (in eq 4) not D^-1 in
linear_attention
:The tensor named
D_inv
is actually D. Unless I'm missing something obvious, which hopefully I am.[tagging @ncilfone because we discussed this recently]
The text was updated successfully, but these errors were encountered: