Skip to content

Instantly share code, notes, and snippets.

@Juraj-Sulimanovic
Created May 21, 2024 12:19
Show Gist options
  • Save Juraj-Sulimanovic/a372c5ca2b14ef1e359a62f19056de82 to your computer and use it in GitHub Desktop.
Save Juraj-Sulimanovic/a372c5ca2b14ef1e359a62f19056de82 to your computer and use it in GitHub Desktop.
output = torch.matmul(scores, values)
output = output.transpose(1, 2).contiguous().view(bsz, seqlen, -1)
return self.wo(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment