From aa3094c91d75a965889a596f742ccaa07cf677ec Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Tue, 21 May 2024 16:20:38 -0700 Subject: [PATCH] Update common/sampling.cpp Co-authored-by: compilade --- common/sampling.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/sampling.cpp b/common/sampling.cpp index 88e5e7b1b..da5295145 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -195,9 +195,7 @@ static llama_token llama_sampling_sample_impl( llama_token id = 0; // Get a pointer to the logits float * logits = llama_get_logits_ith(ctx_main, idx); - if (!logits) { - throw std::runtime_error("llama_get_logits_ith failed"); - } + GGML_ASSERT(logits); // already checked in llama_sampling_prepare if (temp < 0.0) { // greedy sampling, with probs