Skip to content

Commit a68f31e

Browse files
authored
fix KLD percentile output (ggml-org#15999)
In `llama-perplexity`, when using `--kl-divergence`, the KL divergence statistics output mistakenly displays the 99th percentile twice. This change fixes that and correctly displays the 90th percentile as originally intended (presumably).
1 parent b8e09f0 commit a68f31e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perplexity/perplexity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ static void kl_divergence(llama_context * ctx, const common_params & params) {
19311931
LOG("Maximum KLD: %10.6f\n", kld_values.back());
19321932
LOG("99.9%% KLD: %10.6f\n", percentile(kld_values, 0.999f));
19331933
LOG("99.0%% KLD: %10.6f\n", percentile(kld_values, 0.990f));
1934-
LOG("99.0%% KLD: %10.6f\n", percentile(kld_values, 0.990f));
1934+
LOG("90.0%% KLD: %10.6f\n", percentile(kld_values, 0.900f));
19351935
LOG("Median KLD: %10.6f\n", kld_median);
19361936
LOG("10.0%% KLD: %10.6f\n", percentile(kld_values, 0.100f));
19371937
LOG(" 5.0%% KLD: %10.6f\n", percentile(kld_values, 0.050f));

0 commit comments

Comments
 (0)