mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	server: fixed wrong variable name in timing json (#2579)
* server: fixed wrong variable name in timing json * remove redunct entry
This commit is contained in:
		@@ -1008,7 +1008,7 @@ static json format_timings(llama_server_context &llama)
 | 
				
			|||||||
    assert(timings.n_eval == llama.num_tokens_predicted);
 | 
					    assert(timings.n_eval == llama.num_tokens_predicted);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return json{
 | 
					    return json{
 | 
				
			||||||
        {"prompt_n", timings.n_eval},
 | 
					        {"prompt_n", timings.n_p_eval},
 | 
				
			||||||
        {"prompt_ms", timings.t_p_eval_ms},
 | 
					        {"prompt_ms", timings.t_p_eval_ms},
 | 
				
			||||||
        {"prompt_per_token_ms", timings.t_p_eval_ms / timings.n_p_eval},
 | 
					        {"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},
 | 
					        {"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},
 | 
					        {"stopped_limit", llama.stopped_limit},
 | 
				
			||||||
        {"stopping_word", llama.stopping_word},
 | 
					        {"stopping_word", llama.stopping_word},
 | 
				
			||||||
        {"tokens_cached", llama.n_past},
 | 
					        {"tokens_cached", llama.n_past},
 | 
				
			||||||
        {"tokens_predicted", llama.num_tokens_predicted},
 | 
					 | 
				
			||||||
        {"timings", format_timings(llama)},
 | 
					        {"timings", format_timings(llama)},
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user