diff --git a/src/axolotl/utils/trainer.py b/src/axolotl/utils/trainer.py index 37578908e4..0aceee5190 100644 --- a/src/axolotl/utils/trainer.py +++ b/src/axolotl/utils/trainer.py @@ -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