Skip to content

Commit

Permalink
Make sure dolomite conversion isn't always attempted
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Eyceoz <[email protected]>
  • Loading branch information
Maxusmusti committed Nov 6, 2024
1 parent a80982e commit f4d3b85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/instructlab/training/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ def save_hf_format_accelerate(
tokenizer,
accelerator: Accelerator,
samples_seen,
convert_dolomite=True,
is_lora=False,
):
log_rank_0(
Expand All @@ -770,6 +769,11 @@ def save_hf_format_accelerate(
)
start = time.time()

if args.model_type in ("gpt_megatron", "gpt_dolomite"):
convert_dolomite = False
else:
convert_dolomite = True

final_output_dir = Path(args.output_dir) / "hf_format" / f"samples_{samples_seen}"
if args.use_dolomite and convert_dolomite:
tmpdir = TemporaryDirectory("w") # pylint: disable=consider-using-with
Expand Down

0 comments on commit f4d3b85

Please sign in to comment.