From cd978508acfda216d2c946b2b5d5b532b5ab6be3 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Thu, 17 Oct 2024 18:23:02 +0300 Subject: [PATCH] tests : init prob correctly --- tests/test-sampling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-sampling.cpp b/tests/test-sampling.cpp index 8960ced8f..e9dada795 100644 --- a/tests/test-sampling.cpp +++ b/tests/test-sampling.cpp @@ -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 };