Skip to content

Commit aa3094c

Browse files
jartcompilade
andauthored
Update common/sampling.cpp
Co-authored-by: compilade <git@compilade.net>
1 parent 6b17898 commit aa3094c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

common/sampling.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ static llama_token llama_sampling_sample_impl(
195195
llama_token id = 0;
196196
// Get a pointer to the logits
197197
float * logits = llama_get_logits_ith(ctx_main, idx);
198-
if (!logits) {
199-
throw std::runtime_error("llama_get_logits_ith failed");
200-
}
198+
GGML_ASSERT(logits); // already checked in llama_sampling_prepare
201199

202200
if (temp < 0.0) {
203201
// greedy sampling, with probs

0 commit comments

Comments
 (0)