Apply suggestions from code review
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
parent
cfaa525804
commit
f6fd1a97d1
1 changed files with 2 additions and 2 deletions
|
@ -641,7 +641,7 @@ struct llama_server_context
|
|||
continue;
|
||||
}
|
||||
|
||||
if(el[0].is_number_integer())
|
||||
if (el[0].is_number_integer())
|
||||
{
|
||||
llama_token tok = el[0].get<llama_token>();
|
||||
if (tok >= 0 && tok < n_vocab)
|
||||
|
@ -652,7 +652,7 @@ struct llama_server_context
|
|||
else if (el[0].is_string())
|
||||
{
|
||||
auto toks = llama_tokenize(model, el[0].get<std::string>(), false);
|
||||
for(auto tok : toks)
|
||||
for (auto tok : toks)
|
||||
{
|
||||
slot->sparams.logit_bias[tok] = bias;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue