disable print statements for dynatemp

This commit is contained in:
Concedo 2024-01-06 11:14:58 +08:00
parent 123bff9a0f
commit b614a86dd9

View file

@ -8545,14 +8545,14 @@ void llama_sample_entropy(struct llama_context * ctx, llama_token_data_array * c
// Map the normalized entropy to the desired temperature range using the power function
float dyn_temp = min_temp + (max_temp - min_temp) * powf(normalized_entropy, exponent_val);
//todo: Ensure to hide print statements unless debugging!
printf("Your text maxtemp value is: %f\n", max_temp);
// Print the variables
printf("Entropy: %f\n", entropy);
printf("Max Possible Entropy: %f\n", max_entropy);
printf("Normalized Entropy: %f\n", normalized_entropy);
printf("Exponent: %f\n", exponent_val);
printf("Dynamic Temperature (dyn_temp): %f\n", dyn_temp);
// //todo: Ensure to hide print statements unless debugging!
// printf("Your text maxtemp value is: %f\n", max_temp);
// // Print the variables
// printf("Entropy: %f\n", entropy);
// printf("Max Possible Entropy: %f\n", max_entropy);
// printf("Normalized Entropy: %f\n", normalized_entropy);
// printf("Exponent: %f\n", exponent_val);
// printf("Dynamic Temperature (dyn_temp): %f\n", dyn_temp);
// Apply the dynamically calculated temperature scaling
for (size_t i = 0; i < candidates_p->size; ++i) {
@ -8571,12 +8571,12 @@ void llama_sample_entropy(struct llama_context * ctx, llama_token_data_array * c
candidates_p->data[i].p /= cum_sum_double; // Re-normalize the probabilities
}
//todo: Ensure to hide print statements unless debugging!
// Print the updated top 25 probabilities after temperature scaling
printf("\nUpdated Top 25 Probabilities After Dynamic Temperature Scaling (in percentages):\n");
for (size_t i = 0; i < 25 && i < candidates_p->size; ++i) {
printf("Token %zu: %f%%\n", i + 1, candidates_p->data[i].p * 100.0f);
}
// //todo: Ensure to hide print statements unless debugging!
// // Print the updated top 25 probabilities after temperature scaling
// printf("\nUpdated Top 25 Probabilities After Dynamic Temperature Scaling (in percentages):\n");
// for (size_t i = 0; i < 25 && i < candidates_p->size; ++i) {
// printf("Token %zu: %f%%\n", i + 1, candidates_p->data[i].p * 100.0f);
// }
if (ctx) {
ctx->t_sample_us += ggml_time_us() - t_start_sample_us;