Upload google_embeddinggemma-300m_8.txt with huggingface_hub
Browse files
google_embeddinggemma-300m_8.txt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
embeddings = model.encode(words, truncate_dim=512, normalize_embeddings=True)
|
| 3 |
+
|
| 4 |
+
for idx, embedding in enumerate(embeddings):
|
| 5 |
+
print(f"Embedding {idx+1}: {embedding.shape}")
|
| 6 |
+
|
| 7 |
+
print("-"*80)
|
| 8 |
+
check_word_similarities()
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
ERROR:
|
| 12 |
+
Traceback (most recent call last):
|
| 13 |
+
File "/tmp/google_embeddinggemma-300m_8kFRUVt.py", line 14, in <module>
|
| 14 |
+
embeddings = model.encode(words, truncate_dim=512, normalize_embeddings=True)
|
| 15 |
+
^^^^^
|
| 16 |
+
NameError: name 'model' is not defined
|