Skip to content

Commit d94e3ef

Browse files
author
George
committed
fix'
1 parent 4607036 commit d94e3ef

File tree

1 file changed

+5
-1
lines changed
  • src/llmcompressor/transformers/finetune

1 file changed

+5
-1
lines changed

src/llmcompressor/transformers/finetune/runner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def run_sequential_stages(
170170

171171
self.trainer.accelerator.wait_for_everyone()
172172
do_preprocess = True
173+
model = self._model_args.model
173174

174175
for stage in recipe_obj.stages:
175176
# validate stage
@@ -221,8 +222,11 @@ def run_sequential_stages(
221222
calibration_dataloader=calib_data,
222223
recipe_stage=stage_name,
223224
)
225+
model = self._model_args.model
226+
224227
elif run_type is StageRunType.TRAIN:
225228
self.train(checkpoint=checkpoint, stage=stage_name)
229+
model = self.trainer.model
226230

227231
checkpoint = None
228232

@@ -234,7 +238,7 @@ def run_sequential_stages(
234238
):
235239
save_checkpoint(
236240
save_path=self._output_dir,
237-
model=self.trainer.model,
241+
model=model,
238242
processor=self.processor,
239243
save_safetensors=self._training_args.save_safetensors,
240244
save_compressed=self._model_args.save_compressed,

0 commit comments

Comments
 (0)