mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Use updated path to MiniLM bi-encoder model on hugging-face
This commit is contained in:
parent
4839153086
commit
3b81fafa3e
1 changed files with 3 additions and 3 deletions
|
@ -14,9 +14,9 @@ import pathlib
|
||||||
|
|
||||||
def initialize_model():
|
def initialize_model():
|
||||||
"Initialize model for assymetric semantic search. That is, where query smaller than results"
|
"Initialize model for assymetric semantic search. That is, where query smaller than results"
|
||||||
bi_encoder = SentenceTransformer('msmarco-MiniLM-L-6-v3') # The bi-encoder encodes all entries to use for semantic search
|
bi_encoder = SentenceTransformer('sentence-transformers/msmarco-MiniLM-L-6-v3') # The bi-encoder encodes all entries to use for semantic search
|
||||||
top_k = 100 # Number of entries we want to retrieve with the bi-encoder
|
top_k = 100 # Number of entries we want to retrieve with the bi-encoder
|
||||||
cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2') # The cross-encoder re-ranks the results to improve quality
|
cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2') # The cross-encoder re-ranks the results to improve quality
|
||||||
return bi_encoder, cross_encoder, top_k
|
return bi_encoder, cross_encoder, top_k
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue