Skip to content

Commit

Permalink
tests : init prob correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Oct 17, 2024
1 parent 57fb835 commit cd97850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct sampler_tester {
cur.reserve(probs.size());
for (llama_token token_id = 0; token_id < (llama_token)probs.size(); token_id++) {
const float logit = logf(probs[token_id]);
cur.emplace_back(llama_token_data{token_id, logit, 0.0f});
cur.emplace_back(llama_token_data{token_id, logit, probs[token_id]});
}

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

0 comments on commit cd97850

Please sign in to comment.