Add ignore_eos option to generation settings.
This commit is contained in:
parent
2c9ee7a052
commit
655899db89
1 changed files with 8 additions and 0 deletions
|
@ -585,6 +585,14 @@ bool parse_options_completion(json body, llama_server_context& llama, Response &
|
|||
{
|
||||
llama.params.seed = time(NULL);
|
||||
}
|
||||
if (!body["ignore_eos"].is_null() && body["ignore_eos"].get<bool>())
|
||||
{
|
||||
llama.params.logit_bias[llama_token_eos()] = -INFINITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
llama.params.logit_bias.erase(llama_token_eos());
|
||||
}
|
||||
if (!body["prompt"].is_null())
|
||||
{
|
||||
llama.params.prompt = body["prompt"].get<std::string>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue