From 024b5cbb4d7d053f47320895bef3d90431f89bd5 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Mon, 18 Sep 2023 16:28:19 -0400 Subject: [PATCH] Fix for check with cfg and merge_lora --- src/axolotl/cli/__init__.py | 2 +- src/axolotl/cli/merge_lora.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/axolotl/cli/__init__.py b/src/axolotl/cli/__init__.py index ff8eb3b910..90e1d508b0 100644 --- a/src/axolotl/cli/__init__.py +++ b/src/axolotl/cli/__init__.py @@ -70,7 +70,7 @@ def do_merge_lora( model.to(dtype=torch.float16) if cfg.local_rank == 0: - LOG.info("saving merged model") + LOG.info(f"saving merged model to: {str(Path(cfg.output_dir) / 'merged')}") model.save_pretrained( str(Path(cfg.output_dir) / "merged"), safe_serialization=safe_serialization, diff --git a/src/axolotl/cli/merge_lora.py b/src/axolotl/cli/merge_lora.py index 79b7112b56..0caee4c28b 100644 --- a/src/axolotl/cli/merge_lora.py +++ b/src/axolotl/cli/merge_lora.py @@ -13,12 +13,12 @@ def do_cli(config: Path = Path("examples/"), **kwargs): # pylint: disable=duplicate-code print_axolotl_text_art() - parsed_cfg = load_cfg(config, **kwargs) parser = transformers.HfArgumentParser((TrainerCliArgs)) parsed_cli_args, _ = parser.parse_args_into_dataclasses( return_remaining_strings=True ) parsed_cli_args.merge_lora = True + parsed_cfg = load_cfg(config, merge_lora=True, **kwargs) do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)