From 062f668876582f27327189c5496f0651b3c48fa4 Mon Sep 17 00:00:00 2001 From: kalomaze <66376113+kalomaze@users.noreply.github.com> Date: Fri, 15 Dec 2023 12:36:50 -0600 Subject: [PATCH] Change override values for DynaTemp variants 3.9 Temp for Greedy Dynamic Temp 2.2 Temp for HHI Dynamic Temp 1.84 Temp for Entropy Dynamic Temp (this one remains the same as before) --- ExtStuff.txt | 4 ++++ llama.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 ExtStuff.txt diff --git a/ExtStuff.txt b/ExtStuff.txt new file mode 100644 index 0000000000000..c61efb780a5b0 --- /dev/null +++ b/ExtStuff.txt @@ -0,0 +1,4 @@ +worstToken = false +randomizationFactor = 0.0 +isTrueRNG = true +rngSeed = 123456789 \ No newline at end of file diff --git a/llama.cpp b/llama.cpp index 703ed72e9c349..05ba040b47371 100644 --- a/llama.cpp +++ b/llama.cpp @@ -7776,12 +7776,12 @@ void llama_sample_min_p(struct llama_context * ctx, llama_token_data_array * can // Variables to hold the external values bool worstToken = false; // unused from earlier experiment, disregard - float randomizationFactor = 0.0f; // Default value of the randomization factor + float randomizationFactor = 0.1; // Default value of the randomization factor bool isTrueRNG = true; // Default value for RNG type, set to true for true randomness unsigned int rngSeed = 123456789; // Default seed value for deterministic RNG // Check if the randomizationFactor value is above 0 and apply Gaussian noise if so - if (randomizationFactor > 0.0f) { + if (randomizationFactor > 0.0) { printf("Override: Applying Gaussian noise to logits due to the randomizationFactor being greater than 0.0\n"); // Read or write the external values @@ -8204,11 +8204,11 @@ void llama_sample_temp(struct llama_context * ctx, llama_token_data_array * cand } void llama_sample_temperature(struct llama_context * ctx, llama_token_data_array * candidates_p, float temp) { - if (temp >= 1.90 && temp <= 1.92) { + if (temp >= 3.89 && temp <= 3.91) { llama_sample_greedy_dynamic_temp(ctx, candidates_p, temp); } else if (temp >= 1.83 && temp <= 1.85) { llama_sample_entropy(ctx, candidates_p, temp); - } else if (temp >= 1.99 && temp <= 2.01) { + } else if (temp >= 2.19 && temp <= 2.21) { llama_sample_hhi(ctx, candidates_p, temp); } else { // Default sampling method