llama: various bug fixes (#26051)

This commit is contained in:
Xuan-Son Nguyen
2026-07-24 18:56:42 +02:00
committed by GitHub
parent fa72aeccb2
commit 298219f985
7 changed files with 46 additions and 3 deletions
+4
View File
@@ -263,6 +263,10 @@ static void llama_log_softmax(float * array, size_t size) {
*/
static void llama_sampler_temp_impl(llama_token_data_array * cur_p, float temp) {
if (cur_p->size == 0) {
return;
}
if (temp <= 0.0f) {
// find the token with the highest logit and set the rest to -inf
size_t max_i = 0;