-
Notifications
You must be signed in to change notification settings - Fork 36
Support mask low frequence embeddings(LFU) #80
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
base: main
Are you sure you want to change the base?
Conversation
jiashuy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @z52527 ,we can check the result in two ways, and you can select one after your evaluation:
- Generic method:
develop adef lookup_scores(indices, offsets)API forBatchedDynamicEmbeddingTables. It's process is close to forward() but don't need to do deduplication. Just lookup the scores usingfind_pointersas you already used.
But in the test script, you need to figure out how to get theBatchedDynamicEmbeddingTablesfromDistributedModelParallel.
So it may cost more.
2.Only checking the masking's result under debug mode in C++, so it will also make no effect to users.
|
|
||
| // Frequency masking functions | ||
| void mask_embeddings_by_frequency(void *embeddings_ptr, void *scores_ptr, | ||
| int num_embeddings, int embedding_dim, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to num_keys to avoid confusion with the size of embedding table.
d01a4b3 to
2f9a776
Compare
429963d to
d941891
Compare
Description
#73
Checklist