Spaces:
Sleeping
Sleeping
Moved from explicit SentenceTransformer to HuggingFaceEmbeddings
Browse files
notebooks/Fine_Tuning_Embedding_for_PSTuts.ipynb
CHANGED
|
@@ -600,12 +600,12 @@
|
|
| 600 |
}
|
| 601 |
],
|
| 602 |
"source": [
|
| 603 |
-
"
|
| 604 |
"\n",
|
| 605 |
"model_id = \"Snowflake/snowflake-arctic-embed-s\"\n",
|
| 606 |
"model_tag = model_id.split(\"/\")[1]\n",
|
| 607 |
"print(model_tag)\n",
|
| 608 |
-
"model =
|
| 609 |
]
|
| 610 |
},
|
| 611 |
{
|
|
|
|
| 600 |
}
|
| 601 |
],
|
| 602 |
"source": [
|
| 603 |
+
"\n",
|
| 604 |
"\n",
|
| 605 |
"model_id = \"Snowflake/snowflake-arctic-embed-s\"\n",
|
| 606 |
"model_tag = model_id.split(\"/\")[1]\n",
|
| 607 |
"print(model_tag)\n",
|
| 608 |
+
"model = HuggingFaceEmbeddings(model_name=model_id)"
|
| 609 |
]
|
| 610 |
},
|
| 611 |
{
|
notebooks/evaluate_rag.ipynb
CHANGED
|
@@ -110,7 +110,7 @@
|
|
| 110 |
"outputs": [],
|
| 111 |
"source": [
|
| 112 |
"from langchain_openai import OpenAIEmbeddings\n",
|
| 113 |
-
"
|
| 114 |
"from langchain_huggingface import HuggingFaceEmbeddings\n",
|
| 115 |
"\n",
|
| 116 |
"\n",
|
|
@@ -153,7 +153,7 @@
|
|
| 153 |
"base.rag = RAGChainInstance(name=\"base\",\n",
|
| 154 |
" qdrant_client=qdrant_client,\n",
|
| 155 |
" llm=ChatOpenAI(model=\"gpt-4.1-nano\"),\n",
|
| 156 |
-
" embeddings=
|
| 157 |
"\n"
|
| 158 |
]
|
| 159 |
},
|
|
@@ -819,7 +819,7 @@
|
|
| 819 |
"ft.rag = RAGChainInstance(name=\"ft\",\n",
|
| 820 |
" qdrant_client=qdrant_client,\n",
|
| 821 |
" llm=ChatOpenAI(model=\"gpt-4.1-nano\"),\n",
|
| 822 |
-
" embeddings=
|
| 823 |
]
|
| 824 |
},
|
| 825 |
{
|
|
|
|
| 110 |
"outputs": [],
|
| 111 |
"source": [
|
| 112 |
"from langchain_openai import OpenAIEmbeddings\n",
|
| 113 |
+
"\n",
|
| 114 |
"from langchain_huggingface import HuggingFaceEmbeddings\n",
|
| 115 |
"\n",
|
| 116 |
"\n",
|
|
|
|
| 153 |
"base.rag = RAGChainInstance(name=\"base\",\n",
|
| 154 |
" qdrant_client=qdrant_client,\n",
|
| 155 |
" llm=ChatOpenAI(model=\"gpt-4.1-nano\"),\n",
|
| 156 |
+
" embeddings=HuggingFaceEmbeddings(model_name=base_model_HF_id))\n",
|
| 157 |
"\n"
|
| 158 |
]
|
| 159 |
},
|
|
|
|
| 819 |
"ft.rag = RAGChainInstance(name=\"ft\",\n",
|
| 820 |
" qdrant_client=qdrant_client,\n",
|
| 821 |
" llm=ChatOpenAI(model=\"gpt-4.1-nano\"),\n",
|
| 822 |
+
" embeddings=HuggingFaceEmbeddings(model_name=ft_model_HF_id))\n"
|
| 823 |
]
|
| 824 |
},
|
| 825 |
{
|