Update README.md
Browse files
README.md
CHANGED
@@ -121,25 +121,12 @@ Load this model using the `from_pretrained` method:
|
|
121 |
from model2vec import StaticModel
|
122 |
|
123 |
# Load a pretrained Model2Vec model
|
124 |
-
model = StaticModel.from_pretrained("multilingual-e5-small-
|
125 |
|
126 |
# Compute text embeddings
|
127 |
embeddings = model.encode(["Example sentence"])
|
128 |
```
|
129 |
|
130 |
-
Alternatively, you can distill your own model using the `distill` method:
|
131 |
-
```python
|
132 |
-
from model2vec.distill import distill
|
133 |
-
|
134 |
-
# Choose a Sentence Transformer model
|
135 |
-
model_name = "BAAI/bge-base-en-v1.5"
|
136 |
-
|
137 |
-
# Distill the model
|
138 |
-
m2v_model = distill(model_name=model_name, pca_dims=256)
|
139 |
-
|
140 |
-
# Save the model
|
141 |
-
m2v_model.save_pretrained("m2v_model")
|
142 |
-
```
|
143 |
|
144 |
## How it works
|
145 |
|
|
|
121 |
from model2vec import StaticModel
|
122 |
|
123 |
# Load a pretrained Model2Vec model
|
124 |
+
model = StaticModel.from_pretrained("cnmoro/multilingual-e5-small-distilled-64d")
|
125 |
|
126 |
# Compute text embeddings
|
127 |
embeddings = model.encode(["Example sentence"])
|
128 |
```
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
## How it works
|
132 |
|