Fix llama.cpp double decoding
This commit is contained in:
parent
230b562d53
commit
d9b0f2c9c3
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ class LlamaCppModel:
|
||||||
# Handle truncation
|
# Handle truncation
|
||||||
prompt = self.encode(prompt)
|
prompt = self.encode(prompt)
|
||||||
prompt = prompt[-get_max_prompt_length(state):]
|
prompt = prompt[-get_max_prompt_length(state):]
|
||||||
prompt = self.decode(prompt).decode('utf-8')
|
prompt = self.decode(prompt)
|
||||||
|
|
||||||
logit_processors = LogitsProcessorList()
|
logit_processors = LogitsProcessorList()
|
||||||
if state['ban_eos_token']:
|
if state['ban_eos_token']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue