refactor: improve code readability and consistency across multiple files
This commit is contained in:
@@ -788,7 +788,7 @@ pub fn count_tokens(text: &str) -> usize {
|
||||
return bpe.encode_with_special_tokens(text).len();
|
||||
}
|
||||
// Fallback: ~4 chars per token
|
||||
(text.len() + 3) / 4
|
||||
text.len().div_ceil(4)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user