Make bi-encoder return fewer results to reduce cross-encoder latency

This commit is contained in:
Debanjum Singh Solanky 2022-07-27 07:26:02 +04:00
parent 9ab3edf6d6
commit 09727ac3be

View file

@ -20,7 +20,7 @@ def initialize_model(search_config: TextSearchConfig):
torch.set_num_threads(4)
# Number of entries we want to retrieve with the bi-encoder
top_k = 30
top_k = 15
# The bi-encoder encodes all entries to use for semantic search
bi_encoder = load_model(