We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a4d8b0 commit 78f3aafCopy full SHA for 78f3aaf
examples/llm_qat/main.py
@@ -267,10 +267,11 @@ def train():
267
metrics = get_metrics_with_perplexity(metrics)
268
print_rank_0(f"Evaluation results: \n{metrics}")
269
270
- print_rank_0("Saving the model...")
271
- trainer.save_state()
272
- kwargs = {"export_student": True} if training_args.distill else {}
273
- trainer.save_model(training_args.output_dir, **kwargs)
+ if training_args.do_train or quant_args.quant_cfg is not None:
+ print_rank_0("Saving the model...")
+ trainer.save_state()
+ kwargs = {"export_student": True} if training_args.distill else {}
274
+ trainer.save_model(training_args.output_dir, **kwargs)
275
276
277
if __name__ == "__main__":
0 commit comments