From 0cf3b3854b2baff9501beffe766e40e6f357c4d6 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Mon, 16 Sep 2024 16:39:09 +0100 Subject: [PATCH] Update src/ml.py Co-authored-by: Jesse Claven --- src/ml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ml.py b/src/ml.py index e5104c6..19ba8a7 100644 --- a/src/ml.py +++ b/src/ml.py @@ -116,7 +116,7 @@ def _encode_batch_using_sliding_window( if self.get_n_tokens(text) > max_seq_length: windows = sliding_window( text, window_size=max_seq_length, stride=max_seq_length // 2 - ) # Use max_seq_length as window size and half of it as stride + ) # Use reasonable, safe, calculated values for the sliding window processed_texts.extend(windows) window_lengths.append(len(windows)) else: