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

[Task] - Incorporate embeddings (pre-trained and encoder-based) into Merlin Training and Inference #471

Open
MarkMoTrin opened this issue Jul 18, 2022 · 6 comments
Assignees
Milestone

Comments

@MarkMoTrin
Copy link

MarkMoTrin commented Jul 18, 2022

Problem:

Two+ customer teams would like to leverage encoder-based embeddings as additional features in Transformers4Rec. Currently, there is no clear example/path to pass in extra embeddings. This gap in feature prevents teams from adopting Transformers4Rec in production.

Goal:

  • Produce a comprehensive example on how to incorporate embeddings as extra features into Transformers4Rec. Embeddings may be stored in parquet format. Generalizations should be made where possible in examples, especially on defining the schema and other input parameters.

Constraints:

  • Embeddings may be stored in parquet files
  • Workflow should be able to be deployed in Triton

Starting Point:

@MarkMoTrin
Copy link
Author

@viswa-nvidia
Copy link

Removing the milestone 22.09. This is not in the POR yet.

@viswa-nvidia viswa-nvidia removed this from the Merlin 22.09 milestone Jul 27, 2022
@EvenOldridge EvenOldridge added this to the Merlin 22.10 milestone Aug 3, 2022
@EvenOldridge EvenOldridge changed the title [RMP] - Incorporate embeddings (pre-trained and encoder-based) into Transformers4Rec Training and Inference [RMP] - Incorporate embeddings (pre-trained and encoder-based) into Merlin Training and Inference Aug 3, 2022
@viswa-nvidia
Copy link

@benfred , @jperez999 ,
Review this ticket and add planning details. It is still in needs definition.
Convert the check boxes to tickets in the specific repos ( Please remember to update the initiative field )
Once you are satisfied with the planning change status to RMP review
Refer to this doc for the workflow
There is a link to the video that explains the workflow. Let me know if you have any questions.

@oliverholworthy
Copy link
Member

oliverholworthy commented Aug 17, 2022

Edit: sorry, this comment is unrelated to this issue (Transformers4Rec). Related Merlin Models (Tensorflow).

For small embedding tables (fit in GPU memory). Using a tensor initializer is the currently supported functionality (in Merlin Models) for pre-trained embedding tables. An example in this notebook:

@EvenOldridge EvenOldridge changed the title [RMP] - Incorporate embeddings (pre-trained and encoder-based) into Merlin Training and Inference [Task] - Incorporate embeddings (pre-trained and encoder-based) into Merlin Training and Inference Aug 17, 2022
@karlhigley
Copy link
Contributor

@MarkMoTrin When you say "encoder-based embeddings as additional features," does that imply encoding an item attribute (like "text description") using an external model (like BERT) and supplying the resulting embeddings as features for each item in a session? We're not talking about adding a single embedding as a session-level feature, we're talking about adding a list of embeddings as item-level features, yeah?

@gabrielspmoreira
Copy link
Member

When the embedding table are not huge and fit GPU memory, the new PretrainedEmbeddingsInitializer ( NVIDIA-Merlin/Transformers4Rec#572 ) can be used to initialize the embedding matrix with pre-trained embeddings and set them to trainable or not.

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

8 participants