-
Notifications
You must be signed in to change notification settings - Fork 456
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
How to share embeddings of some features between two EmbeddingBagCollections? #1916
Comments
Hi, @henrylhtsang @IvanKobzarev @joshuadeng @PaulZhang12 can you see this problem? |
|
@henrylhtsang If we use VBE, the output of the user tower and item tower will also be padded to the same batch size. Is this approach efficient? |
@tiankongdeguiji oh I misspoke. I meant to say you either need to pad the inputs, or use VBE. iirc you shouldn't need to pad the outputs of VBE, but admittedly I am not familiar with that part |
@henrylhtsang
If we use VBE to implement share-embedding, the output of the user tower and item tower will be padded to the same batch_size.
batch_size of user tower is 4 rather than 2. |
not an expert, but can you try the sharded version of ebc? not sure if the unsharded ebc supports VBE very well |
In a two-tower retrieval model, it is essential to randomly sample negative items. Typically, this means that the batch size for the item tower will be larger than that for the user tower. Consequently, using a single EmbeddingBagCollection proves to be inadequate for this setup. When employing two separate EmbeddingBagCollections, how to share embeddings of some features between two EmbeddingBagCollections?
The text was updated successfully, but these errors were encountered: