server : fix off-by-1 in server_tokens::size_up_to_pos() (#20279)

* server : fix off-by-1 in server_tokens::size_up_to_pos()

* cont : fix typo [no ci]
This commit is contained in:
Georgi Gerganov
2026-03-09 16:43:38 +02:00
committed by GitHub
parent f76565db92
commit d6e1556499
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ public:
// the next position after n_tokens. if n_tokens < 0, return the next position after all tokens.
llama_pos pos_next(int64_t n_tokens = -1) const;
// number of tokens with position <= max_pos
// number of tokens with position < max_pos
size_t size_up_to_pos(llama_pos max_pos) const;
const mtmd::input_chunk_ptr & find_chunk(size_t idx) const;