nomic[patch]: release 0.0.2, dimensionality (#17534)

- nomic[patch]: release 0.0.2
- x
This commit is contained in:
Erick Friis
2024-02-14 08:38:07 -08:00
committed by GitHub
parent 9e8a3fc4ff
commit d7418acbe1
5 changed files with 215 additions and 200 deletions

View File

@@ -58,7 +58,7 @@
"source": [
"from langchain_nomic.embeddings import NomicEmbeddings\n",
"\n",
"embeddings = NomicEmbeddings(model=\"nomic-embed-text-v1\")"
"embeddings = NomicEmbeddings(model=\"nomic-embed-text-v1.5\")"
]
},
{
@@ -106,6 +106,28 @@
" [\"This is a content of the document\", \"This is another document\"]\n",
")"
]
},
{
"cell_type": "markdown",
"id": "7a331dc3",
"metadata": {},
"source": [
"### Custom Dimensionality\n",
"\n",
"Nomic's `nomic-embed-text-v1.5` model was [trained with Matryoshka learning](https://blog.nomic.ai/posts/nomic-embed-matryoshka) to enable variable-length embeddings with a single model. This means that you can specify the dimensionality of the embeddings at inference time. The model supports dimensionality from 64 to 768."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "993f65c8",
"metadata": {},
"outputs": [],
"source": [
"embeddings = NomicEmbeddings(model=\"nomic-embed-text-v1.5\", dimensionality=256)\n",
"\n",
"embeddings.embed_query(\"My query to look up\")"
]
}
],
"metadata": {