mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-03 05:34:01 +00:00
Update bge_huggingface.ipynb (#8960)
- 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 <erick@langchain.dev>
This commit is contained in:
parent
f4742dce50
commit
23c261ba57
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user