Update README.md
Browse files
README.md
CHANGED
@@ -16,11 +16,8 @@ datasets:
|
|
16 |
|
17 |
# Ruri: Japanese General Text Embeddings
|
18 |
|
19 |
-
|
20 |
## Usage
|
21 |
|
22 |
-
### Direct Usage (Sentence Transformers)
|
23 |
-
|
24 |
First install the Sentence Transformers library:
|
25 |
|
26 |
```bash
|
@@ -45,7 +42,7 @@ sentences = [
|
|
45 |
|
46 |
embeddings = model.encode(sentences, convert_to_tensor=True)
|
47 |
print(embeddings.size())
|
48 |
-
# [4,
|
49 |
|
50 |
similarities = F.cosine_similarity(embeddings.unsqueeze(0), embeddings.unsqueeze(1), dim=2)
|
51 |
print(similarities)
|
|
|
16 |
|
17 |
# Ruri: Japanese General Text Embeddings
|
18 |
|
|
|
19 |
## Usage
|
20 |
|
|
|
|
|
21 |
First install the Sentence Transformers library:
|
22 |
|
23 |
```bash
|
|
|
42 |
|
43 |
embeddings = model.encode(sentences, convert_to_tensor=True)
|
44 |
print(embeddings.size())
|
45 |
+
# [4, 768]
|
46 |
|
47 |
similarities = F.cosine_similarity(embeddings.unsqueeze(0), embeddings.unsqueeze(1), dim=2)
|
48 |
print(similarities)
|