Skip to content

Commit

Permalink
debug epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 committed Oct 31, 2024
1 parent 91fc5df commit ba682ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/sft/alpaca-llama-sft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ supervised_data:
# Additional settings
tokenizer: "allenai/OLMo-1B"
max_tune_length: 2048
epoch: 3
epoch: 0

initialize_from_hf: false
6 changes: 3 additions & 3 deletions examples/sft/sft.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def train(config: SFTConfig):
train_dataset = PermutationDataset(train_dataset, data_key)

# Then wrap for epochs
if config.epoch > 0:
logger.info(f"Wrapping dataset for {config.epoch} epochs")
train_dataset = EpochDataset(train_dataset, max_epochs=config.epoch)
# if config.epoch > 0:
# logger.info(f"Wrapping dataset for {config.epoch} epochs")
# train_dataset = EpochDataset(train_dataset, max_epochs=config.epoch)

logger.info("Creating optimizer")
optimizer = config.optimizer.build(config.trainer.num_train_steps)
Expand Down

0 comments on commit ba682ca

Please sign in to comment.