Skip to content

Commit 6659652

Browse files
committed
lower actual temp used when temp=0
1 parent 0e41b94 commit 6659652

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpttype_adapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void sample_temperature(llama_token_data_array * candidates_p, float temp)
243243
if (temp <= 0)
244244
{
245245
// Imitate greedy sampling
246-
temp = 0.01f; //cannot be zero else div0
246+
temp = 0.00390625f; //cannot be zero else div0, this is 1/256
247247
llama_sample_temperature(nullptr, candidates_p, temp);
248248
llama_sample_top_k(nullptr, candidates_p, 1, 1); //only want first candidate
249249
}

0 commit comments

Comments
 (0)