Update README.md
Browse files
README.md
CHANGED
@@ -23,10 +23,12 @@ Below is an example and a set of functions to compute the cosine similarity betw
|
|
23 |
|
24 |
### load_model_and_tokenizer
|
25 |
|
|
|
|
|
|
|
26 |
<details>
|
27 |
<summary><b>Details</b></summary>
|
28 |
|
29 |
-
loads the model and tokenizer based on `model_name`. It returns a tuple containing the loaded model and tokenizer.
|
30 |
|
31 |
```python
|
32 |
from typing import List, Tuple
|
@@ -161,11 +163,11 @@ embeddings = get_embeddings(model, tokenizer, texts)
|
|
161 |
calculate_cosine_similarity(embeddings, texts)
|
162 |
```
|
163 |
|
164 |
-
This will print the cosine similarity between the first text and all other texts in the `texts
|
165 |
|
166 |
## References
|
167 |
|
168 |
-
|
169 |
|
170 |
```
|
171 |
@article{muennighoff2022sgpt,
|
|
|
23 |
|
24 |
### load_model_and_tokenizer
|
25 |
|
26 |
+
Loads the model and tokenizer based on `model_name`, returning a tuple containing the loaded model and tokenizer.
|
27 |
+
|
28 |
+
|
29 |
<details>
|
30 |
<summary><b>Details</b></summary>
|
31 |
|
|
|
32 |
|
33 |
```python
|
34 |
from typing import List, Tuple
|
|
|
163 |
calculate_cosine_similarity(embeddings, texts)
|
164 |
```
|
165 |
|
166 |
+
This will print the cosine similarity between the first text and all other texts in the `texts' list.
|
167 |
|
168 |
## References
|
169 |
|
170 |
+
Inference with this model/the example is based on the ideas and examples in the [SGPT repository](https://github.com/Muennighoff/sgpt#symmetric-semantic-search-be).
|
171 |
|
172 |
```
|
173 |
@article{muennighoff2022sgpt,
|