Upload Qwen_Qwen3-Embedding-0.6B_0.txt with huggingface_hub
Browse files
Qwen_Qwen3-Embedding-0.6B_0.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
from sentence_transformers import SentenceTransformer
|
| 3 |
+
|
| 4 |
+
model = SentenceTransformer("Qwen/Qwen3-Embedding-0.6B")
|
| 5 |
+
|
| 6 |
+
sentences = [
|
| 7 |
+
"The weather is lovely today.",
|
| 8 |
+
"It's so sunny outside!",
|
| 9 |
+
"He drove to the stadium."
|
| 10 |
+
]
|
| 11 |
+
embeddings = model.encode(sentences)
|
| 12 |
+
|
| 13 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 14 |
+
print(similarities.shape)
|
| 15 |
+
# [3, 3]
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
ERROR:
|
| 19 |
+
Traceback (most recent call last):
|
| 20 |
+
File "/tmp/Qwen_Qwen3-Embedding-0.6B_02swo0t.py", line 14, in <module>
|
| 21 |
+
from sentence_transformers import SentenceTransformer
|
| 22 |
+
ModuleNotFoundError: No module named 'sentence_transformers'
|