From 6a72e32dab4fda1f06b96ec47616f89625a122a6 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Wed, 23 Aug 2023 15:53:38 +0000 Subject: [PATCH] add debug output to starcoder --- src/starcoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/starcoder.cpp b/src/starcoder.cpp index 74aaea8..c196f3c 100644 --- a/src/starcoder.cpp +++ b/src/starcoder.cpp @@ -766,6 +766,10 @@ std::stringstream StarcoderModel::predict(std::string prompt, int max_length, bo break; } } + spdlog::debug("{}: sample time = {:8.2f} ms\n", __func__, t_sample_us/1000.0f); + spdlog::debug("{}: predict time = {:8.2f} ms / {:.2f} ms per token\n", __func__, t_predict_us/1000.0f, t_predict_us/1000.0f/n_past); + + return result; }