@@ -156,7 +156,7 @@ def from_pretrained(
156156 subfolder : str | None = None ,
157157 quantize_to : str | DType | None = None ,
158158 dimensionality : int | None = None ,
159- skip_metadata : bool = False ,
159+ force_download : bool = False ,
160160 ) -> StaticModel :
161161 """
162162 Load a StaticModel from a local path or huggingface hub path.
@@ -172,8 +172,8 @@ def from_pretrained(
172172 :param dimensionality: The dimensionality of the model. If this is None, use the dimensionality of the model.
173173 This is useful if you want to load a model with a lower dimensionality.
174174 Note that this only applies if you have trained your model using mrl or PCA.
175- :param skip_metadata : Whether to skip loading metadata. This is useful if you don't need the metadata.
176- Loading metadata can be slow for models with lots of results in the README.md
175+ :param force_download : Whether to force the download of the model. If False, the model is only downloaded if it is not
176+ already present in the cache.
177177 :return: A StaticModel.
178178 """
179179 from model2vec .hf_utils import load_pretrained
@@ -183,7 +183,7 @@ def from_pretrained(
183183 token = token ,
184184 from_sentence_transformers = False ,
185185 subfolder = subfolder ,
186- skip_metadata = skip_metadata ,
186+ force_download = force_download ,
187187 )
188188
189189 embeddings = quantize_and_reduce_dim (
@@ -209,7 +209,7 @@ def from_sentence_transformers(
209209 normalize : bool | None = None ,
210210 quantize_to : str | DType | None = None ,
211211 dimensionality : int | None = None ,
212- skip_metadata : bool = False ,
212+ force_download : bool = False ,
213213 ) -> StaticModel :
214214 """
215215 Load a StaticModel trained with sentence transformers from a local path or huggingface hub path.
@@ -224,8 +224,8 @@ def from_sentence_transformers(
224224 :param dimensionality: The dimensionality of the model. If this is None, use the dimensionality of the model.
225225 This is useful if you want to load a model with a lower dimensionality.
226226 Note that this only applies if you have trained your model using mrl or PCA.
227- :param skip_metadata : Whether to skip loading metadata. This is useful if you don't need the metadata.
228- Loading metadata can be slow for models with lots of results in the README.md
227+ :param force_download : Whether to force the download of the model. If False, the model is only downloaded if it is not
228+ already present in the cache.
229229 :return: A StaticModel.
230230 """
231231 from model2vec .hf_utils import load_pretrained
@@ -235,7 +235,7 @@ def from_sentence_transformers(
235235 token = token ,
236236 from_sentence_transformers = True ,
237237 subfolder = None ,
238- skip_metadata = skip_metadata ,
238+ force_download = force_download ,
239239 )
240240
241241 embeddings = quantize_and_reduce_dim (
0 commit comments