mirror of
https://github.com/ggerganov/llama.cpp
synced 2026-03-02 21:29:35 +01:00
server : fix division by zero when reporting stats (#16501)
This commit is contained in:
parent
81086cd6a3
commit
e60f01d941
@ -4226,7 +4226,7 @@ struct server_context {
|
||||
metrics.on_prompt_eval(slot);
|
||||
}
|
||||
|
||||
slot.t_token_generation = (t_current - slot.t_start_generation) / 1e3;
|
||||
slot.t_token_generation = std::max<int64_t>(1, t_current - slot.t_start_generation) / 1e3;
|
||||
|
||||
completion_token_output result;
|
||||
result.tok = id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user