Update _utils.py
This commit is contained in:
parent
2a6bc2ad10
commit
b2e429da3e
1 changed files with 1 additions and 0 deletions
|
|
@ -1009,6 +1009,7 @@ def _unsloth_get_batch_samples(self, epoch_iterator, num_batches):
|
|||
except StopIteration:
|
||||
break
|
||||
|
||||
print("NUM_ITMES = ", num_items_in_batch)
|
||||
if len(batch_samples) > 0 and "labels" in batch_samples[0]:
|
||||
try:
|
||||
num_items_in_batch = sum([(batch["labels"].ne(-100)).sum() for batch in batch_samples])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue