powered by
Test inference speed and throughput with the current model to measure the effectiveness of optimizations.
edge_benchmark( ctx, prompt = "The quick brown fox", n_predict = 50, iterations = 3 )
List with performance metrics
Model context from edge_load_model()
Test prompt to use for benchmarking (default: standard test)
Number of tokens to generate for the test
Number of test iterations to average results
if (FALSE) { setup <- edge_quick_setup("TinyLlama-1.1B") if (!is.null(setup$context)) { ctx <- setup$context perf <- edge_benchmark(ctx) print(perf) edge_free_model(ctx) } }
Run the code above in your browser using DataLab