Skip to content

Commit 045bc8b

Browse files
committed
manually trigger on_start on initialize
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
1 parent ad1c3c3 commit 045bc8b

File tree

1 file changed

+5
-0
lines changed
  • src/llmcompressor/modifiers/quantization/quantization

1 file changed

+5
-0
lines changed

src/llmcompressor/modifiers/quantization/quantization/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def on_initialize(self, state: State, **kwargs) -> bool:
6161
"""
6262
QuantizationMixin.attach_scheme_and_observers(self, state.model)
6363
state.model.apply(disable_quantization) # disable quantization until start
64+
65+
# FUTURE: modify oneshot lifecycle to trigger on_start for on initialize
66+
if self.calculate_start() == -1: # one shot
67+
self.on_start(state)
68+
6469
return True
6570

6671
def on_start(self, state: State):

0 commit comments

Comments
 (0)