llama.cpp: fix ban_eos_token (#3987)
This commit is contained in:
parent
0ede2965d5
commit
8466cf229a
1 changed files with 1 additions and 1 deletions
|
@ -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(',')]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue