Skip to content

Commit baf3d37

Browse files
committed
tests : init prob correctly
1 parent e5150b1 commit baf3d37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test-sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct sampler_tester {
3333
cur.reserve(probs.size());
3434
for (llama_token token_id = 0; token_id < (llama_token)probs.size(); token_id++) {
3535
const float logit = logf(probs[token_id]);
36-
cur.emplace_back(llama_token_data{token_id, logit, 0.0f});
36+
cur.emplace_back(llama_token_data{token_id, logit, probs[token_id]});
3737
}
3838

3939
cur_p = llama_token_data_array { cur.data(), cur.size(), -1, false };

0 commit comments

Comments
 (0)