summaryrefslogtreecommitdiff
path: root/examples/server/server.cpp
diff options
context:
space:
mode:
authorEquim <sayaka@ekyu.moe>2023-08-12 06:35:14 +0800
committerGitHub <noreply@github.com>2023-08-12 00:35:14 +0200
commit53dc399472d5bd35ee739b865e843b1996bd3814 (patch)
tree746aa9aca92708def3e23e96d743456e35c6d09b /examples/server/server.cpp
parent9ca4abed893685692f90413e4d43153af12342d9 (diff)
server: fixed wrong variable name in timing json (#2579)
* server: fixed wrong variable name in timing json * remove redunct entry
Diffstat (limited to 'examples/server/server.cpp')
-rw-r--r--examples/server/server.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/server/server.cpp b/examples/server/server.cpp
index 637f6d6c..2340f93a 100644
--- a/examples/server/server.cpp
+++ b/examples/server/server.cpp
@@ -1008,7 +1008,7 @@ static json format_timings(llama_server_context &llama)
assert(timings.n_eval == llama.num_tokens_predicted);
return json{
- {"prompt_n", timings.n_eval},
+ {"prompt_n", timings.n_p_eval},
{"prompt_ms", timings.t_p_eval_ms},
{"prompt_per_token_ms", timings.t_p_eval_ms / timings.n_p_eval},
{"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
{"stopped_limit", llama.stopped_limit},
{"stopping_word", llama.stopping_word},
{"tokens_cached", llama.n_past},
- {"tokens_predicted", llama.num_tokens_predicted},
{"timings", format_timings(llama)},
};