main : pass ctx to llama_token_nl()

This commit is contained in:
Georgi Gerganov 2023-08-26 21:06:41 +03:00 committed by GitHub
parent 0d29c8aaef
commit 1bf050c2a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -605,7 +605,7 @@ int main(int argc, char ** argv) {
last_n_repeat, alpha_frequency, alpha_presence); last_n_repeat, alpha_frequency, alpha_presence);
if (!penalize_nl) { if (!penalize_nl) {
for (size_t idx = 0; idx < candidates_p.size; idx++) { for (size_t idx = 0; idx < candidates_p.size; idx++) {
if (candidates_p.data[idx].id == llama_token_nl()) { if (candidates_p.data[idx].id == llama_token_nl(ctx)) {
candidates_p.data[idx].logit = nl_logit; candidates_p.data[idx].logit = nl_logit;
break; break;
} }