Skip to content

Commit 3ffd0fa

Browse files
authored
perplexity : show more kl-divergence data (ggml-org#16321)
Adds additional percentile data for displayed in the output of `llama-perplexity --kl-divergence`: - Added 95 percentile (mirroring existing 5 percentile) - Added 0.1 percentile (mirroring existing 99.9 percentile)
1 parent a4a0aa5 commit 3ffd0fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perplexity/perplexity.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,11 +1931,13 @@ 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("95.0%% KLD: %10.6f\n", percentile(kld_values, 0.950f));
19341935
LOG("90.0%% KLD: %10.6f\n", percentile(kld_values, 0.900f));
19351936
LOG("Median KLD: %10.6f\n", kld_median);
19361937
LOG("10.0%% KLD: %10.6f\n", percentile(kld_values, 0.100f));
19371938
LOG(" 5.0%% KLD: %10.6f\n", percentile(kld_values, 0.050f));
19381939
LOG(" 1.0%% KLD: %10.6f\n", percentile(kld_values, 0.010f));
1940+
LOG(" 0.1%% KLD: %10.6f\n", percentile(kld_values, 0.001f));
19391941
LOG("Minimum KLD: %10.6f\n", kld_values.front());
19401942

19411943
LOG("\n");

0 commit comments

Comments
 (0)