]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama-bench : use two tokens in the warmup run for prompt evals (#3059)
authorslaren <redacted>
Thu, 7 Sep 2023 13:52:34 +0000 (15:52 +0200)
committerGitHub <redacted>
Thu, 7 Sep 2023 13:52:34 +0000 (15:52 +0200)
examples/llama-bench/llama-bench.cpp

index 72a025077b3593086edc32521d9268e63e14125c..dedaa34fd84ba2dc4e1030c350973802181694ed 100644 (file)
@@ -986,7 +986,12 @@ int main(int argc, char ** argv) {
         test t(inst, lmodel, ctx);
 
         // warmup run
-        test_gen(ctx, 1, 0, t.n_threads);
+        if (t.n_prompt > 0) {
+            test_prompt(ctx, std::min(2, t.n_batch), 0, t.n_batch, t.n_threads);
+        }
+        if (t.n_gen > 0) {
+            test_gen(ctx, 1, 0, t.n_threads);
+        }
 
         for (int i = 0; i < params.reps; i++) {
             uint64_t t_start = get_time_ns();