Skip to content

Commit 4cab29e

Browse files
committed
small cleanup
Signed-off-by: Kyle Sayers <[email protected]>
1 parent a979f8a commit 4cab29e

File tree

1 file changed

+8
-9
lines changed
  • src/llmcompressor/modifiers/transform/spinquant

1 file changed

+8
-9
lines changed

src/llmcompressor/modifiers/transform/spinquant/base.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,17 @@ def on_initialize(self, state: State, **kwargs) -> bool:
6262
return True
6363

6464
config_groups = {}
65-
for rotation in self.rotations:
66-
if rotation == SpinquantRotation.R1:
67-
config_groups["R1"] = self._create_r1_scheme()
65+
if SpinquantRotation.R1 in self.rotations:
66+
config_groups["R1"] = self._create_r1_scheme()
6867

69-
if rotation == SpinquantRotation.R2:
70-
config_groups["R2"] = self._create_r2_scheme(state.model)
68+
if SpinquantRotation.R2 in self.rotations:
69+
config_groups["R2"] = self._create_r2_scheme(state.model)
7170

72-
if rotation == SpinquantRotation.R3:
73-
config_groups["R3"] = self._create_r3_scheme()
71+
if SpinquantRotation.R3 in self.rotations:
72+
config_groups["R3"] = self._create_r3_scheme()
7473

75-
if rotation == SpinquantRotation.R4:
76-
config_groups["R4"] = self._create_r4_scheme()
74+
if SpinquantRotation.R4 in self.rotations:
75+
config_groups["R4"] = self._create_r4_scheme()
7776

7877
self.transform_config = TransformConfig(config_groups=config_groups)
7978

0 commit comments

Comments
 (0)