File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
src/compressed_tensors/quantization Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class QuantizationScheme(BaseModel):
36
36
of modules should be quantized
37
37
38
38
:param targets: list of modules to apply the QuantizationArgs to, can be layer
39
- names, layer types or a regular expression
39
+ names, layer types or a regular expression, typically ["Linear"]
40
40
:param weights: quantization config for layer weights
41
41
:param input_activations: quantization config for layer inputs
42
42
:param output_activations: quantization config for layer outputs
@@ -47,28 +47,6 @@ class QuantizationScheme(BaseModel):
47
47
input_activations : Optional [QuantizationArgs ] = None
48
48
output_activations : Optional [QuantizationArgs ] = None
49
49
50
- @classmethod
51
- def default_scheme (
52
- cls ,
53
- targets : Optional [List [str ]] = None ,
54
- ):
55
-
56
- if targets is None :
57
- # default to quantizing all Linear layers
58
- targets = ["Linear" ]
59
-
60
- # by default, activations and weights are left unquantized
61
- weights = None
62
- input_activations = None
63
- output_activations = None
64
-
65
- return cls (
66
- targets = targets ,
67
- weights = weights ,
68
- input_activations = input_activations ,
69
- output_activations = output_activations ,
70
- )
71
-
72
50
73
51
"""
74
52
Pre-Set Quantization Scheme Args
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def test_needs_targets():
53
53
54
54
def test_defaults ():
55
55
targets = ["Linear" ]
56
- output = QuantizationScheme . default_scheme (targets = targets )
56
+ output = QuantizationScheme (targets = targets )
57
57
assert output .weights is None
58
58
assert output .input_activations is None
59
59
assert output .output_activations is None
You can’t perform that action at this time.
0 commit comments