From 96b6d648951fa7023fcbc701e3856ab96c2a1a61 Mon Sep 17 00:00:00 2001 From: gpu-poor Date: Tue, 3 Mar 2026 00:21:16 +0530 Subject: [PATCH] putting back the comment which got removed accidently, no functionality change --- scripts/chat_sft.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/chat_sft.py b/scripts/chat_sft.py index f91822d..f31a2d3 100644 --- a/scripts/chat_sft.py +++ b/scripts/chat_sft.py @@ -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