server : minor

This commit is contained in:
Georgi Gerganov 2024-03-05 17:22:28 +02:00
parent f4800d54e7
commit 7635b13ad7
No known key found for this signature in database
GPG key ID: BF970631944C16B7
2 changed files with 20 additions and 20 deletions

View file

@ -436,7 +436,7 @@ Notice that each `probs` is an array of length `n_probs`.
"next_token": {
"has_next_token": true,
"n_remain": -1,
"num_tokens_predicted": 0,
"n_decoded": 0,
"stopped_eos": false,
"stopped_limit": false,
"stopped_word": false,

View file

@ -845,7 +845,7 @@ struct llama_server_context {
{"token_text", tokens_to_output_formatted_string(ctx, result.tok)},
{"has_next_token", slot.has_next_token},
{"n_remain", slot.n_remaining},
{"num_tokens_predicted", slot.n_decoded},
{"n_decoded", slot.n_decoded},
{"stopped_eos", slot.stopped_eos},
{"stopped_word", slot.stopped_word},
{"stopped_limit", slot.stopped_limit},
@ -1185,7 +1185,7 @@ struct llama_server_context {
slot_data["next_token"] = {
{"has_next_token", slot.has_next_token},
{"n_remain", slot.n_remaining},
{"num_tokens_predicted", slot.n_decoded},
{"n_decoded", slot.n_decoded},
{"stopped_eos", slot.stopped_eos},
{"stopped_word", slot.stopped_word},
{"stopped_limit", slot.stopped_limit},
@ -2913,9 +2913,9 @@ int main(int argc, char ** argv) {
json prompt;
if (body.count("input") != 0) {
prompt = body["input"];
// batch
if (prompt.is_array()) {
json data = json::array();
int i = 0;
for (const json & elem : prompt) {
const int id_task = llama.queue_tasks.get_new_id();