diff --git a/src/compressed_tensors/quantization/quant_scheme.py b/src/compressed_tensors/quantization/quant_scheme.py index 180d0f26..47ce0a9b 100644 --- a/src/compressed_tensors/quantization/quant_scheme.py +++ b/src/compressed_tensors/quantization/quant_scheme.py @@ -36,7 +36,7 @@ class QuantizationScheme(BaseModel): of modules should be quantized :param targets: list of modules to apply the QuantizationArgs to, can be layer - names, layer types or a regular expression + names, layer types or a regular expression, typically ["Linear"] :param weights: quantization config for layer weights :param input_activations: quantization config for layer inputs :param output_activations: quantization config for layer outputs @@ -47,28 +47,6 @@ class QuantizationScheme(BaseModel): input_activations: Optional[QuantizationArgs] = None output_activations: Optional[QuantizationArgs] = None - @classmethod - def default_scheme( - cls, - targets: Optional[List[str]] = None, - ): - - if targets is None: - # default to quantizing all Linear layers - targets = ["Linear"] - - # by default, activations and weights are left unquantized - weights = None - input_activations = None - output_activations = None - - return cls( - targets=targets, - weights=weights, - input_activations=input_activations, - output_activations=output_activations, - ) - """ Pre-Set Quantization Scheme Args diff --git a/tests/test_quantization/test_quant_scheme.py b/tests/test_quantization/test_quant_scheme.py index 14ee5b72..0ea7f31f 100644 --- a/tests/test_quantization/test_quant_scheme.py +++ b/tests/test_quantization/test_quant_scheme.py @@ -53,7 +53,7 @@ def test_needs_targets(): def test_defaults(): targets = ["Linear"] - output = QuantizationScheme.default_scheme(targets=targets) + output = QuantizationScheme(targets=targets) assert output.weights is None assert output.input_activations is None assert output.output_activations is None