Skip to content

Commit 53dc399

Browse files
authored
server: fixed wrong variable name in timing json (#2579)
* server: fixed wrong variable name in timing json * remove redunct entry
1 parent 9ca4abe commit 53dc399

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ static json format_timings(llama_server_context &llama)
10081008
assert(timings.n_eval == llama.num_tokens_predicted);
10091009

10101010
return json{
1011-
{"prompt_n", timings.n_eval},
1011+
{"prompt_n", timings.n_p_eval},
10121012
{"prompt_ms", timings.t_p_eval_ms},
10131013
{"prompt_per_token_ms", timings.t_p_eval_ms / timings.n_p_eval},
10141014
{"prompt_per_second", 1e3 / timings.t_p_eval_ms * timings.n_p_eval},
@@ -1037,7 +1037,6 @@ static json format_final_response(llama_server_context &llama, const std::string
10371037
{"stopped_limit", llama.stopped_limit},
10381038
{"stopping_word", llama.stopping_word},
10391039
{"tokens_cached", llama.n_past},
1040-
{"tokens_predicted", llama.num_tokens_predicted},
10411040
{"timings", format_timings(llama)},
10421041
};
10431042

0 commit comments

Comments
 (0)