Skip to content

Commit

Permalink
Update common/sampling.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: compilade <[email protected]>
  • Loading branch information
jart and compilade authored May 21, 2024
1 parent 6b17898 commit aa3094c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions common/sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa3094c

Please sign in to comment.