fix LLAMA_TOKEN_NULL checks in penalties sampler

This commit is contained in:
slaren 2024-09-08 15:16:50 +02:00
parent f3ecf6d740
commit e1c4fb7f9c

View file

@ -1487,11 +1487,11 @@ struct llama_sampler * llama_sampler_init_penalties(
bool penalize_nl, bool penalize_nl,
bool ignore_eos) { bool ignore_eos) {
if (linefeed_id == LLAMA_TOKEN_NULL) { if (linefeed_id == LLAMA_TOKEN_NULL) {
penalize_nl = false; penalize_nl = true;
} }
if (special_eos_id == LLAMA_TOKEN_NULL) { if (special_eos_id == LLAMA_TOKEN_NULL) {
ignore_eos = true; ignore_eos = false;
} }
return new llama_sampler { return new llama_sampler {