Skip to content

Commit

Permalink
fix: enable progress bars in do_merge_lora()
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Johan Alm committed Dec 6, 2023
1 parent ac4c9d6 commit 4054c80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/axolotl/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@ def do_merge_lora(
safe_serialization = cfg.save_safetensors is True

LOG.info("running merge of LoRA with base model")
model = model.merge_and_unload()
model = model.merge_and_unload(progressbar=True)
model.to(dtype=cfg.torch_dtype)

if cfg.local_rank == 0:
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,
progressbar=True,
)
tokenizer.save_pretrained(str(Path(cfg.output_dir) / "merged"))

Expand Down

0 comments on commit 4054c80

Please sign in to comment.