mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	main : print total token count and tokens consumed so far (#4874)
* Token count changes * Add show token count * Updating before PR * Two requested changes * Move param def posn
This commit is contained in:
		| @@ -10921,7 +10921,7 @@ void llama_print_timings(struct llama_context * ctx) { | ||||
|             __func__, timings.t_p_eval_ms, timings.n_p_eval, timings.t_p_eval_ms / timings.n_p_eval, 1e3 / timings.t_p_eval_ms * timings.n_p_eval); | ||||
|     LLAMA_LOG_INFO("%s:        eval time = %10.2f ms / %5d runs   (%8.2f ms per token, %8.2f tokens per second)\n", | ||||
|             __func__, timings.t_eval_ms, timings.n_eval, timings.t_eval_ms / timings.n_eval, 1e3 / timings.t_eval_ms * timings.n_eval); | ||||
|     LLAMA_LOG_INFO("%s:       total time = %10.2f ms\n", __func__, (timings.t_end_ms - timings.t_start_ms)); | ||||
|     LLAMA_LOG_INFO("%s:       total time = %10.2f ms / %5d tokens\n", __func__, (timings.t_end_ms - timings.t_start_ms), (timings.n_p_eval + timings.n_eval)); | ||||
| } | ||||
|  | ||||
| void llama_reset_timings(struct llama_context * ctx) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pudepiedj
					pudepiedj