Skip to content

Commit

Permalink
drop empty tokenized rows too (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored Aug 30, 2023
1 parent 1e07c16 commit c56b450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def add_position_ids(sample):


def drop_long_seq(sample, sequence_len=2048):
return len(sample["input_ids"]) <= sequence_len
return len(sample["input_ids"]) <= sequence_len and len(sample["input_ids"]) > 0


@contextmanager
Expand Down

0 comments on commit c56b450

Please sign in to comment.