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

How to deploy in real recommender systems #2

Closed
weilonghu opened this issue Nov 17, 2022 · 3 comments
Closed

How to deploy in real recommender systems #2

weilonghu opened this issue Nov 17, 2022 · 3 comments

Comments

@weilonghu
Copy link

I have several questions:

  1. As I known, faiss does not support 'max' operation.
  2. Fot i-th layer user representaion, we will compute each head pairwise to get the similarity score, So we need to retrieve H^2 times?If there are L layers, eventually we need to retrieve L* H^2 times?

Thanks!

@archersama
Copy link
Owner

thank your question.
1.we just save and get item embedding in faiss, 'max' operation is conducted in inference code.
2.In our code, for all heads, the Fe score is done in a parallel way. For a single layer, it only needs once to compute similarity score. For L layers, we only compute L times.

And in online inference, we find that only using last layer to compute MaxSim Score is also useful, so you can use last layer to
compute MaxSim score to get the similarity score.

@weilonghu
Copy link
Author

Thanks for your reply, I'll try it later

@archersama
Copy link
Owner

It's ok, feel free to ask questions

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