Skip to content

Commit

Permalink
Update src/ml.py
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Claven <[email protected]>
  • Loading branch information
kdutia and jesse-c authored Sep 16, 2024
1 parent fca1214 commit 0cf3b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0cf3b38

Please sign in to comment.