mirror of
https://github.com/karpathy/nanochat.git
synced 2026-03-07 01:40:30 +00:00
putting back the comment which got removed accidently, no functionality change
This commit is contained in:
parent
014084a656
commit
96b6d64895
|
|
@ -293,6 +293,7 @@ def sft_data_generator_bos_bestfit(split, buffer_size=100):
|
|||
targets[mask_targets == 0] = -1
|
||||
|
||||
# Mask out padding positions in targets (set to -1 = ignore_index)
|
||||
# For each row, positions >= (content_length - 1) in targets should be masked
|
||||
for i, content_len in enumerate(row_lengths):
|
||||
if content_len < row_capacity:
|
||||
targets[i, content_len-1:] = -1
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user