From e1c4fb7f9cf0658e4a1698057b3a3993e561a464 Mon Sep 17 00:00:00 2001 From: slaren Date: Sun, 8 Sep 2024 15:16:50 +0200 Subject: [PATCH] fix LLAMA_TOKEN_NULL checks in penalties sampler --- src/llama-sampling.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama-sampling.cpp b/src/llama-sampling.cpp index 1e2bc8c98..10261c991 100644 --- a/src/llama-sampling.cpp +++ b/src/llama-sampling.cpp @@ -1487,11 +1487,11 @@ struct llama_sampler * llama_sampler_init_penalties( bool penalize_nl, bool ignore_eos) { if (linefeed_id == LLAMA_TOKEN_NULL) { - penalize_nl = false; + penalize_nl = true; } if (special_eos_id == LLAMA_TOKEN_NULL) { - ignore_eos = true; + ignore_eos = false; } return new llama_sampler {