You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: model2vec/distill/distillation.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,7 @@ def distill(
204
204
apply_zipf: bool=True,
205
205
use_subword: bool=True,
206
206
token_remove_pattern: str|None=r"\[unused\d+\]",
207
+
trust_remote_code: bool=False,
207
208
) ->StaticModel:
208
209
"""
209
210
Distill a staticmodel from a sentence transformer.
@@ -223,11 +224,12 @@ def distill(
223
224
:param apply_zipf: Whether to apply Zipf weighting to the embeddings.
224
225
:param use_subword: Whether to keep subword tokens in the vocabulary. If this is False, you must pass a vocabulary, and the returned tokenizer will only detect full words.
225
226
:param token_remove_pattern: If this is set to a string, we compile this into a regex. Any tokens that conform to this regex pattern will be removed from the vocabulary.
227
+
:param trust_remote_code: Whether to trust the remote code. If this is False, we will only load components coming from `transformers`. If this is True, we will load all components.
0 commit comments