Thanks to visit codestin.com
Credit goes to github.com

Skip to content

question on duplex attention (k means) code #45

@nintendops

Description

@nintendops

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions