Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 committed Jan 17, 2025
1 parent 9b9989d commit 9d2f894
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/levanter/main/sft.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ def train(config: SFTConfig):
output_role=config.output_role,
)

if config.enable_packing:
train_dataset = mk_chat_sft_packed_dataset(
chat_config,
tokenizer,
model_config.Pos,
max_segments_per_example=config.max_segments_per_example
)
else:
train_dataset = mk_chat_sft_dataset(chat_config, tokenizer, model_config.Pos)
# if config.enable_packing:
train_dataset = mk_chat_sft_packed_dataset(
chat_config,
tokenizer,
model_config.Pos,
max_segments_per_example=4
)
# else:
# train_dataset = mk_chat_sft_dataset(chat_config, tokenizer, model_config.Pos)
else:
assert config.supervised_data is not None
if isinstance(config.supervised_data, dict):
Expand Down

0 comments on commit 9d2f894

Please sign in to comment.