Skip to content

Commit

Permalink
fix masking bug
Browse files Browse the repository at this point in the history
  • Loading branch information
itayhubara committed Feb 1, 2024
1 parent 6a6ca47 commit 87992ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llm_finetune/scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ScriptArguments:
default=6, metadata={"help": "Log every X updates steps."}
)
target_eval_loss: float = field(
default=1.19, metadata={"help": "target eval loss - NOT FINAL."}
default=0.92, metadata={"help": "target eval loss - NOT FINAL."}
)
output_dir: str = field(
default="results", metadata={"help": "Where to store the final model."}
Expand Down
3 changes: 2 additions & 1 deletion llm_finetune/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def group_texts(examples, block_size):
k: [t[i : i + block_size] for i in range(0, total_length, block_size)]
for k, t in concatenated_examples.items()
}
result["labels"] = result["input_ids"].copy()
if 'labels' not in result:
result["labels"] = result["input_ids"].copy()
return result


Expand Down

0 comments on commit 87992ca

Please sign in to comment.