Update README.md
Browse files
README.md
CHANGED
@@ -54,11 +54,13 @@ pip install flash-attn --no-build-isolation
|
|
54 |
|
55 |
Then you can load this model and run inference.
|
56 |
```python
|
|
|
57 |
import torch.nn.functional as F
|
58 |
from sentence_transformers import SentenceTransformer
|
59 |
|
60 |
# Download from the 🤗 Hub
|
61 |
-
|
|
|
62 |
|
63 |
# Ruri v3 employs a 1+3 prefix scheme to distinguish between different types of text inputs:
|
64 |
# "" (empty string) is used for encoding semantic meaning.
|
|
|
54 |
|
55 |
Then you can load this model and run inference.
|
56 |
```python
|
57 |
+
import torch
|
58 |
import torch.nn.functional as F
|
59 |
from sentence_transformers import SentenceTransformer
|
60 |
|
61 |
# Download from the 🤗 Hub
|
62 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
63 |
+
model = SentenceTransformer("cl-nagoya/ruri-v3-310m", device=device)
|
64 |
|
65 |
# Ruri v3 employs a 1+3 prefix scheme to distinguish between different types of text inputs:
|
66 |
# "" (empty string) is used for encoding semantic meaning.
|