add debug logs to codegen

This commit is contained in:
James Ravenscroft 2023-08-23 14:57:31 +00:00
parent cd9baacdd7
commit bad53ad190
2 changed files with 4 additions and 2 deletions

View File

@ -642,5 +642,9 @@ std::stringstream GPTJModel::predict(std::string prompt, int max_length, bool in
}
}
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;
}

View File

@ -709,8 +709,6 @@ std::stringstream GPTNEOXModel::predict(std::string prompt, int max_length, bool
break;
}
}
t_response_us = ggml_time_us() - t_start_us - t_prompt_us;
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);