Skip to content
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

question on duplex attention (k means) code #45

Open
nintendops opened this issue Oct 15, 2022 · 0 comments
Open

question on duplex attention (k means) code #45

nintendops opened this issue Oct 15, 2022 · 0 comments

Comments

@nintendops
Copy link

nintendops commented Oct 15, 2022

First, thank you for this amazing work!

I am suspecting that an indentation is missing at the following position of the code:

# Compute attention scores based on dot products between

The reason why it raises my suspicion is that, if the code is executed as it is, it seems like the actual key values (to_tensor) are never involved in the computation of the attention scores when k means is enabled. If I am mistaken, would you mind explain why line 787 replaces the original attention scores with the values computed here (where the embedding "to_centroids" seems to be initialized to be a mapping of the queries)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant