| llama_perf_reset | R Documentation |
Resets the timing and token count statistics for the context.
llama_perf_reset(ctx)
ctx |
Context handle returned by [llama_new_context] |
No return value, called for side effects.
## Not run:
# Reset counters before benchmarking a specific generation
llama_perf_reset(ctx)
result <- llama_generate(ctx, "Benchmark prompt", max_new_tokens = 100L)
perf <- llama_perf(ctx)
cat("Generation:", perf$n_eval / (perf$t_eval_ms / 1000), "tok/s\n")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.