lower actual temp used when temp=0
This commit is contained in:
parent
0e41b94f40
commit
6659652c9f
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ void sample_temperature(llama_token_data_array * candidates_p, float temp)
|
|||
if (temp <= 0)
|
||||
{
|
||||
// Imitate greedy sampling
|
||||
temp = 0.01f; //cannot be zero else div0
|
||||
temp = 0.00390625f; //cannot be zero else div0, this is 1/256
|
||||
llama_sample_temperature(nullptr, candidates_p, temp);
|
||||
llama_sample_top_k(nullptr, candidates_p, 1, 1); //only want first candidate
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue