Skip to content

Commit b3dce58

Browse files
committed
Should probably re-normalize after "truncating"...
1 parent 90c730e commit b3dce58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

base/llama-addon.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ void llama_sample_xtc_addon(struct llama_context * ctx, llama_token_data_array *
5252
}
5353
}
5454

55+
candidates->sorted = false;
56+
57+
// Re-normalize probabilities
58+
llama_sample_softmax(ctx, candidates);
59+
5560
llama_set_time(ctx, t_start_sample_us);
5661
}
5762

0 commit comments

Comments
 (0)