Skip to content

Commit 70ee96e

Browse files
DOC-4544 fixed wrong model name in text
1 parent 3cdad7c commit 70ee96e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/develop/clients/php/vecsearch.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ or JSON fields, Redis can retrieve documents that closely match the query in ter
2929
of their meaning.
3030

3131
The example below uses the [HuggingFace](https://huggingface.co/) model
32-
[`all-mpnet-base-v2`](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
32+
[`all-MiniLM-L6-v2`](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
3333
to generate the vector embeddings to store and index with Redis Query Engine.
3434

3535
## Initialize
@@ -66,7 +66,7 @@ use Predis\Command\Argument\Search\SchemaFields\VectorField;
6666
## Create a tokenizer instance
6767

6868
The code below shows how to use the
69-
[`all-mpnet-base-v2`](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
69+
[`all-MiniLM-L6-v2`](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
7070
tokenizer to generate the embeddings. The vectors that represent the
7171
embeddings have 384 dimensions, regardless of the length of the input
7272
text. Here, the `pipeline()` call creates the `$extractor` function that
@@ -104,7 +104,7 @@ the original text content. The `embedding` field specifies
104104
indexing, the
105105
[L2]({{< relref "/develop/interact/search-and-query/advanced-concepts/vectors#distance-metrics" >}})
106106
vector distance metric, `Float32` values to represent the vector's components,
107-
and 384 dimensions, as required by the `all-mpnet-base-v2` embedding model.
107+
and 384 dimensions, as required by the `all-MiniLM-L6-v2` embedding model.
108108

109109
The `CreateArguments` parameter to [`ftcreate()`]({{< relref "/commands/ft.create" >}})
110110
specifies hash objects for storage and a prefix `doc:` that identifies the hash objects
@@ -144,7 +144,7 @@ embeddings from multiple strings parameters at once, so it returns an array of
144144
embedding vectors. Here, there is only one embedding in the returned array.
145145
The `normalize:` and `pooling:` named parameters relate to details
146146
of the embedding model (see the
147-
[`all-mpnet-base-v2`](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
147+
[`all-MiniLM-L6-v2`](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
148148
page for more information).
149149

150150
To add an embedding as a field of a hash object, you must encode the
@@ -244,7 +244,7 @@ for ($i = 1; $i < ($numResults * 2 + 1); $i += 2) {
244244
Assuming you have added the code from the steps above to your source file,
245245
it is now ready to run, but note that it may take a while to complete when
246246
you run it for the first time (which happens because the tokenizer must download the
247-
`all-mpnet-base-v2` model data before it can
247+
`all-MiniLM-L6-v2` model data before it can
248248
generate the embeddings). When you run the code, it outputs the following result text:
249249

250250
```

0 commit comments

Comments
 (0)