mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 02:44:36 +00:00
Show perplexity ETA in hours and minutes (#1096)
This commit is contained in:
parent
d40fded93e
commit
3d59769c3b
@ -53,7 +53,13 @@ void perplexity(llama_context * ctx, const gpt_params & params) {
|
|||||||
auto end_t = std::chrono::high_resolution_clock::now();
|
auto end_t = std::chrono::high_resolution_clock::now();
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
const float seconds = std::chrono::duration<float>(end_t - start_t).count();
|
const float seconds = std::chrono::duration<float>(end_t - start_t).count();
|
||||||
printf("%.2f seconds per pass - ETA %.2f hours\n", seconds, (seconds * seq_count) / (60.0*60.0));
|
printf("%.2f seconds per pass - ETA ", seconds);
|
||||||
|
int total_seconds = (int)(seconds * seq_count);
|
||||||
|
if (total_seconds >= 60*60) {
|
||||||
|
printf("%d hours ", total_seconds / (60*60));
|
||||||
|
total_seconds = total_seconds % (60*60);
|
||||||
|
}
|
||||||
|
printf("%d minutes\n", total_seconds / 60);
|
||||||
}
|
}
|
||||||
// We get the logits for all the tokens in the context window (params.n_ctx)
|
// We get the logits for all the tokens in the context window (params.n_ctx)
|
||||||
// from llama_eval above. Now, based on https://huggingface.co/docs/transformers/perplexity,
|
// from llama_eval above. Now, based on https://huggingface.co/docs/transformers/perplexity,
|
||||||
|
Loading…
Reference in New Issue
Block a user