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 #1

Closed
banxianerr opened this issue May 31, 2022 · 1 comment
Closed

question #1

banxianerr opened this issue May 31, 2022 · 1 comment

Comments

@banxianerr
Copy link

Very good job. Congratulations! And thank you for sharing codes.
I have some questions, Which variables represent search and retrieval? Are qk_dim and nrules?

@sarthmit
Copy link
Owner

Hello @banxianerr
The variable nheads represents searches, and nrules represents the number of values. So for each search in nheads, a value from nrules is chosen through the secondary attention mechanism, which is parameterized by the qk_dim. Does that answer your question?

As an example, nheads=2 and nrules=3 means 2 searches, and 3 retrievals per search. Now if qk_dim = 32, that means the dimensionality of secondary query-key attention is 32, which is used to soft-select retrievals per search.

@sarthmit sarthmit closed this as completed Jun 2, 2022
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

2 participants