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

[Enhancement]: Batch evaluate similarity for all searched data from vector database #646

Open
Laarryliu opened this issue Sep 3, 2024 · 1 comment

Comments

@Laarryliu
Copy link

What would you like to be added?

In GPTCache/gptcache/adapter/adapter.py, after searching data from vector db, there is a for loop (line 379) to call get_scalar_data and evaluation method in order to get the rank of each data. However, some rerank models support batch inference which allows batch evaluation. Is there a way to perform batch similarity evaluations at once instead of executing them serially?

Why is this needed?

Batch inference means that the model will only be called once, and the performance will be better.

Anything else?

No response

@Laarryliu Laarryliu changed the title [Enhancement]: Batch evaluate similarit for all searched data from vector database [Enhancement]: Batch evaluate similarity for all searched data from vector database Sep 3, 2024
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
@Laarryliu and others