mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
llama.cpp: fix ban_eos_token (#3987)
This commit is contained in:
parent
0ede2965d5
commit
8466cf229a
@ -120,7 +120,7 @@ class LlamaCppModel:
|
|||||||
|
|
||||||
logit_processors = LogitsProcessorList()
|
logit_processors = LogitsProcessorList()
|
||||||
if state['ban_eos_token']:
|
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']:
|
if state['custom_token_bans']:
|
||||||
to_ban = [int(x) for x in state['custom_token_bans'].split(',')]
|
to_ban = [int(x) for x in state['custom_token_bans'].split(',')]
|
||||||
|
Loading…
Reference in New Issue
Block a user