mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Fix truncate
This commit is contained in:
@ -85,7 +85,7 @@ impl Encoding {
|
||||
}
|
||||
|
||||
pub fn truncate(&mut self, max_len: usize, stride: usize) {
|
||||
if max_len > self.ids.len() {
|
||||
if max_len >= self.ids.len() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user