compressed_tensors.quantization.quant_scheme
Classes:
-
QuantizationScheme–Set of QuantizationArgs defining how the weights, inputs and outputs of target list
Functions:
-
is_preset_scheme–:param name: preset quantization settings name
-
preset_name_to_scheme–:param name: preset quantization settings name. must exist in upper case in
QuantizationScheme
Bases: BaseModel
Set of QuantizationArgs defining how the weights, inputs and outputs of target list of modules should be quantized
Parameters:
-
targets–list of modules to apply the QuantizationArgs to, can be layer names, layer types or a regular expression, typically ["Linear"]
-
weights–quantization config for layer weights
-
input_activations–quantization config for layer inputs
-
output_activations–quantization config for layer outputs
-
format–CompressionFormat for the layer
is_preset_scheme
Parameters:
-
name(str) –preset quantization settings name
Returns:
-
bool–True if the name is a preset scheme name
preset_name_to_scheme
Parameters:
-
name(str) –preset quantization settings name. must exist in upper case in PRESET_SCHEMES
-
targets(list[str]) –list of quantization targets to be passed to the Scheme
Returns:
-
QuantizationScheme–new QuantizationScheme for a given name with the given targets