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 use cached sentence embedding vector as the input instead of text? #140

Open
Visla-Melinda-Devins opened this issue Sep 30, 2022 · 0 comments

Comments

@Visla-Melinda-Devins
Copy link

Hi, we have multiple tasks that use SBERT sentence embedding, therefore we embed the text once and cache the sentence embedding vectors, then re-use the vectors everywhere. We found it really improve the time performance of our applications.

Is there a way for the model to take sentence embedding vectors as the input instead of text?
The following is how we use the model. Thank you

model = SBertSummarizer('all-mpnet-base-v2')
sum_3sent = model(text_prefer_sentence_vectors, num_sentences=3)

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

1 participant