Aamir
commited on
Commit
•
d1946e5
1
Parent(s):
dd3c0fb
Update README.md
Browse files
README.md
CHANGED
@@ -2649,7 +2649,7 @@ new_embedding_size = 768 # 2D: set embedding size
|
|
2649 |
embeddings = model.encode(
|
2650 |
[
|
2651 |
'Who is german and likes bread?',
|
2652 |
-
'Everybody in
|
2653 |
]
|
2654 |
)
|
2655 |
|
@@ -2682,7 +2682,7 @@ embedding_size = 768 # 2d: embedding size
|
|
2682 |
# 3. encode
|
2683 |
embeddings = model.encode([
|
2684 |
'Who is german and likes bread?',
|
2685 |
-
'Everybody in
|
2686 |
], layer_index=layer_index, embedding_size=embedding_size)
|
2687 |
|
2688 |
similarities = cos_sim(embeddings[0], embeddings[1:])
|
|
|
2649 |
embeddings = model.encode(
|
2650 |
[
|
2651 |
'Who is german and likes bread?',
|
2652 |
+
'Everybody in Germany.'
|
2653 |
]
|
2654 |
)
|
2655 |
|
|
|
2682 |
# 3. encode
|
2683 |
embeddings = model.encode([
|
2684 |
'Who is german and likes bread?',
|
2685 |
+
'Everybody in Germany.'
|
2686 |
], layer_index=layer_index, embedding_size=embedding_size)
|
2687 |
|
2688 |
similarities = cos_sim(embeddings[0], embeddings[1:])
|