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