This commit is contained in:
Concedo
2025-11-18 18:56:31 +08:00
parent 7aea1d7c02
commit 8631bbcee3
5 changed files with 55 additions and 55 deletions
+1 -1
View File
@@ -1525,7 +1525,7 @@ void sample_entropy(llama_token_data_array * cur_p, float min_temp, float max_te
// Only apply smoothing if smoothing_factor is > 0. Do not change base implementation otherwise.
if (smoothing_factor > 0 && cur_p->size > 1) {
sample_softmax(cur_p);
float h = cur_p->data[0].logit; // Find the maximum logit for h to be added after the transformation
float h = cur_p->data[0].logit; // Find the maximum logit for h to be added after the transformation
// Apply the modified quadratic transformation using the smoothing_factor and smoothing_curve
for (size_t i = 0; i < cur_p->size; ++i) {
float logit_shifted = cur_p->data[i].logit - h;