Support mask low frequence embeddings(LFU)#80
Open
z52527 wants to merge 3 commits intoNVIDIA:mainfrom
Open
Conversation
jiashuy
reviewed
Jul 2, 2025
Collaborator
jiashuy
left a comment
There was a problem hiding this comment.
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.
shijieliu
reviewed
Jul 3, 2025
shijieliu
reviewed
Jul 24, 2025
|
|
||
| // Frequency masking functions | ||
| void mask_embeddings_by_frequency(void *embeddings_ptr, void *scores_ptr, | ||
| int num_embeddings, int embedding_dim, |
Collaborator
There was a problem hiding this comment.
rename to num_keys to avoid confusion with the size of embedding table.
d01a4b3 to
2f9a776
Compare
jiashuy
reviewed
Oct 28, 2025
jiashuy
reviewed
Oct 28, 2025
429963d to
d941891
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#73
Checklist