From 8466cf229ab29ace6e336a96f81f4eda44ca94fa Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Mon, 18 Sep 2023 11:15:02 -0400 Subject: [PATCH] llama.cpp: fix ban_eos_token (#3987) --- modules/llamacpp_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/llamacpp_model.py b/modules/llamacpp_model.py index 44bb61f..951267e 100644 --- a/modules/llamacpp_model.py +++ b/modules/llamacpp_model.py @@ -120,7 +120,7 @@ class LlamaCppModel: logit_processors = LogitsProcessorList() if state['ban_eos_token']: - logit_processors.append(partial(ban_eos_logits_processor, self.model.tokenizer.eos_token_id)) + logit_processors.append(partial(ban_eos_logits_processor, self.model.token_eos())) if state['custom_token_bans']: to_ban = [int(x) for x in state['custom_token_bans'].split(',')]