Skip to content

Commit

Permalink
Update bge_huggingface.ipynb (#8960)
Browse files Browse the repository at this point in the history
- Description: Considering the similarity computation method of
[BGE](https://github.com/FlagOpen/FlagEmbedding) model is cosine
similarity, set normalize_embeddings to be True.
- Tag maintainer: @baskaryan

Co-authored-by: Erick Friis <[email protected]>
  • Loading branch information
staoxiao and efriis authored Oct 17, 2023
1 parent f4742dc commit 23c261b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"\n",
"model_name = \"BAAI/bge-small-en\"\n",
"model_kwargs = {'device': 'cpu'}\n",
"encode_kwargs = {'normalize_embeddings': False}\n",
"encode_kwargs = {'normalize_embeddings': True}\n",
"hf = HuggingFaceBgeEmbeddings(\n",
" model_name=model_name,\n",
" model_kwargs=model_kwargs,\n",
Expand Down

0 comments on commit 23c261b

Please sign in to comment.