Skip to content

Commit 0a2ce59

Browse files
author
Olivier Chafik
committed
Update main.cpp
1 parent ae25370 commit 0a2ce59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/main/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ int main(int argc, char ** argv) {
707707

708708
const llama_token id = llama_sampling_sample(ctx_sampling, ctx, ctx_guidance);
709709

710-
llama_sampling_accept(ctx_sampling, ctx, id, true);
710+
llama_sampling_accept(ctx_sampling, ctx, id, /* apply_grammar= */ true);
711711

712712
LOG("last: %s\n", LOG_TOKENS_TOSTR_PRETTY(ctx, ctx_sampling->prev).c_str());
713713

@@ -728,7 +728,7 @@ int main(int argc, char ** argv) {
728728

729729
// push the prompt in the sampling context in order to apply repetition penalties later
730730
// for the prompt, we don't apply grammar rules
731-
llama_sampling_accept(ctx_sampling, ctx, embd_inp[n_consumed], false);
731+
llama_sampling_accept(ctx_sampling, ctx, embd_inp[n_consumed], /* apply_grammar= */ false);
732732

733733
++n_consumed;
734734
if ((int) embd.size() >= params.n_batch) {

0 commit comments

Comments
 (0)