Skip to content

Commit

Permalink
fix(android): type of prompt_per_second / predicted_per_second in tim…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
jhen0409 committed Nov 10, 2023
1 parent 34b557e commit 3c6c300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android/src/main/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ Java_com_rnllama_LlamaContext_doCompletion(
putInt(env, timingsResult, "prompt_n", timings.n_p_eval);
putInt(env, timingsResult, "prompt_ms", timings.t_p_eval_ms);
putInt(env, timingsResult, "prompt_per_token_ms", timings.t_p_eval_ms / timings.n_p_eval);
putInt(env, timingsResult, "prompt_per_second", 1e3 / timings.t_p_eval_ms * timings.n_p_eval);
putDouble(env, timingsResult, "prompt_per_second", 1e3 / timings.t_p_eval_ms * timings.n_p_eval);
putInt(env, timingsResult, "predicted_n", timings.n_eval);
putInt(env, timingsResult, "predicted_ms", timings.t_eval_ms);
putInt(env, timingsResult, "predicted_per_token_ms", timings.t_eval_ms / timings.n_eval);
putInt(env, timingsResult, "predicted_per_second", 1e3 / timings.t_eval_ms * timings.n_eval);
putDouble(env, timingsResult, "predicted_per_second", 1e3 / timings.t_eval_ms * timings.n_eval);

putMap(env, result, "timings", timingsResult);

Expand Down

0 comments on commit 3c6c300

Please sign in to comment.