Update README.md
Browse files
README.md
CHANGED
|
@@ -201,9 +201,9 @@ embeddings = F.normalize(embeddings, p=2, dim=1)
|
|
| 201 |
</p>
|
| 202 |
</details>
|
| 203 |
|
| 204 |
-
|
| 205 |
-
2. Alternatively, you can use `jina-embeddings-v3` directly via transformers package.
|
| 206 |
|
|
|
|
| 207 |
```python
|
| 208 |
!pip install transformers
|
| 209 |
from transformers import AutoModel
|
|
@@ -247,8 +247,18 @@ embeddings = model.encode(
|
|
| 247 |
)
|
| 248 |
```
|
| 249 |
|
|
|
|
| 250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
|
|
|
|
|
|
| 252 |
|
| 253 |
|
| 254 |
|
|
|
|
| 201 |
</p>
|
| 202 |
</details>
|
| 203 |
|
| 204 |
+
The easiest way to start using `jina-embeddings-v3` is Jina AI's [Embeddings API](https://jina.ai/embeddings/).
|
|
|
|
| 205 |
|
| 206 |
+
Alternatively, you can use `jina-embeddings-v3` directly via Transformers package:
|
| 207 |
```python
|
| 208 |
!pip install transformers
|
| 209 |
from transformers import AutoModel
|
|
|
|
| 247 |
)
|
| 248 |
```
|
| 249 |
|
| 250 |
+
The latest version (#todo: specify version) of SentenceTransformers also supports `jina-embeddings-v3`:
|
| 251 |
|
| 252 |
+
```python
|
| 253 |
+
!pip install -U sentence-transformers
|
| 254 |
+
from sentence_transformers import SentenceTransformer
|
| 255 |
+
|
| 256 |
+
model = SentenceTransformer(
|
| 257 |
+
"jinaai/jina-embeddings-v3", trust_remote_code=True
|
| 258 |
+
)
|
| 259 |
|
| 260 |
+
embeddings = model.encode(['How is the weather today?'], task_type='retrieval.query')
|
| 261 |
+
```
|
| 262 |
|
| 263 |
|
| 264 |
|