Skip to content

Commit d08cde8

Browse files
authored
completion : session_tokens insert range in completion tool (no-op → correct) (ggml-org#20917)
The embd.begin(), embd.begin() range is empty and inserts nothing, so session_tokens never gets updated after decoding. Should be embd.begin(), embd.end(). Introduced in commit ef66a16.
1 parent 3a2c859 commit d08cde8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/completion/completion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ int main(int argc, char ** argv) {
701701
if (!common_prompt_batch_decode(ctx, embd, n_past, params.n_batch, path_session, save_now)) {
702702
return 1;
703703
}
704-
session_tokens.insert(session_tokens.end(), embd.begin(), embd.begin());
704+
session_tokens.insert(session_tokens.end(), embd.begin(), embd.end());
705705
n_session_consumed = session_tokens.size();
706706
session_do_save = false;
707707

0 commit comments

Comments
 (0)