Sentence Similarity
Safetensors
Japanese
modernbert
feature-extraction
hpprc commited on
Commit
18b60fb
·
verified ·
1 Parent(s): 1996d71

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
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
- model = SentenceTransformer("cl-nagoya/ruri-v3-310m")
 
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.