fixed unbantokens not following EOS
This commit is contained in:
parent
294a5d00b1
commit
25201233ca
1 changed files with 5 additions and 0 deletions
|
@ -674,6 +674,11 @@ generation_outputs gpttype_generate(const generation_inputs inputs, generation_o
|
||||||
if (file_format == FileFormat::GGML || file_format == FileFormat::GGHF || file_format == FileFormat::GGJT)
|
if (file_format == FileFormat::GGML || file_format == FileFormat::GGHF || file_format == FileFormat::GGJT)
|
||||||
{
|
{
|
||||||
concat_output += llama_token_to_str(llama_ctx_v1, id);
|
concat_output += llama_token_to_str(llama_ctx_v1, id);
|
||||||
|
if(unbanTokens && id==llama_token_eos())
|
||||||
|
{
|
||||||
|
printf("\n(EOS token triggered!)");
|
||||||
|
remaining_tokens = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue