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
Distill a staticmodel from a sentence transformer.
@@ -54,6 +58,7 @@ def distill_from_model(
54
58
If the pattern is so general that it removes all tokens, we throw an error. If the pattern can't be compiled into a valid regex, we also throw an error.
55
59
:param quantize_to: The data type to quantize to. Can be any of the DType enum members or their string equivalents.
56
60
:param use_subword: DEPRECATED: If this is not set to None, we show a warning. It doesn't do anything.
61
+
:param vocabulary_quantization: The number of clusters to use for vocabulary quantization. If this is None, no quantization is performed.
57
62
:return: A StaticModel
58
63
:raises: ValueError if the vocabulary is empty after preprocessing.
59
64
@@ -103,7 +108,6 @@ def distill_from_model(
103
108
104
109
# Replace the vocabulary in the tokenizer with the new vocabulary.
Distill a staticmodel from a sentence transformer.
@@ -235,6 +250,7 @@ def distill(
235
250
: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.
236
251
:param quantize_to: The data type to quantize to. Can be any of the DType enum members or their string equivalents.
237
252
:param use_subword: DEPRECATED: If this is not set to None, we show a warning. It doesn't do anything.
253
+
:param vocabulary_quantization: The number of clusters to use for vocabulary quantization. If this is None, no quantization is performed.
0 commit comments