From 8f429fa5111901f9646cf998643ac5310846d487 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 3 Sep 2023 13:42:56 +0300 Subject: perplexity : fix ETA by warming up the model with an empty run --- common/common.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/common.cpp') diff --git a/common/common.cpp b/common/common.cpp index 41fc59ce..a1c3dc78 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -752,6 +752,14 @@ std::tuple llama_init_from_gpt_par params.logit_bias[llama_token_eos(lctx)] = -INFINITY; } + { + LOG("warming up the model with an empty run\n"); + + const std::vector tmp = { llama_token_bos(lctx), }; + llama_eval(lctx, tmp.data(), tmp.size(), 0, params.n_threads); + llama_reset_timings(lctx); + } + return std::make_tuple(model, lctx); } -- cgit v1.2.3