We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 456ddb3 commit 9152659Copy full SHA for 9152659
src/llama-sampling.cpp
@@ -1750,6 +1750,10 @@ static const char * llama_sampler_top_n_sigma_name(const struct llama_sampler *
1750
static void llama_sampler_top_n_sigma_apply(struct llama_sampler * smpl, llama_token_data_array * cur_p) {
1751
const auto * ctx = (llama_sampler_top_n_sigma *) smpl->ctx;
1752
1753
+ if (ctx->n < 0.0f) {
1754
+ return;
1755
+ }
1756
+
1757
// find max logit and calculate mean
1758
float max = cur_p->data[0].logit;
1759
float logits_sum = 0;
0 commit comments