File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/llmcompressor/modifiers/transform/quip Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class QuIPModifier(Modifier):
47
47
transform_type : Literal ["hadamard" , "random-hadamard" , "random-matrix" ] = Field (
48
48
default = "random-hadamard"
49
49
)
50
+ targets : Union [List [str ], str ] = Field (default = "str" )
50
51
randomize : bool = Field (default = False )
51
52
learnable : bool = Field (default = False )
52
53
precision : TorchDtype = Field (default = torch .float64 )
@@ -102,12 +103,12 @@ def _create_config(self) -> TransformConfig:
102
103
type = self .transform_type ,
103
104
apply = [
104
105
TransformArgs (
105
- targets = [ "Linear" ] ,
106
+ targets = self . targets ,
106
107
location = "input" , # non-mergable
107
108
ignore = self .ignore ,
108
109
),
109
110
TransformArgs (
110
- targets = [ "Linear" ] ,
111
+ targets = self . targets ,
111
112
location = "weight_input" ,
112
113
inverse = True ,
113
114
ignore = self .ignore ,
@@ -121,12 +122,12 @@ def _create_config(self) -> TransformConfig:
121
122
type = self .transform_type ,
122
123
apply = [
123
124
TransformArgs (
124
- targets = [ "Linear" ] ,
125
+ targets = self . targets ,
125
126
location = "weight_output" ,
126
127
ignore = self .ignore ,
127
128
),
128
129
TransformArgs (
129
- targets = [ "Linear" ] ,
130
+ targets = self . targets ,
130
131
location = "output" , # non-mergable
131
132
inverse = True ,
132
133
ignore = self .ignore ,
You can’t perform that action at this time.
0 commit comments