diff --git a/examples/main/README.md b/examples/main/README.md index 9591b1b0a..f2de4e81b 100644 --- a/examples/main/README.md +++ b/examples/main/README.md @@ -273,7 +273,7 @@ Top-nσ sampling is a text generation method that selects tokens based on a stat Example usage: `--top-nsigma 1` -### Logit Bias +### Logit Bias - `-l TOKEN_ID(+/-)BIAS, --logit-bias TOKEN_ID(+/-)BIAS`: Modify the likelihood of a token appearing in the generated text completion. diff --git a/src/llama-sampling.cpp b/src/llama-sampling.cpp index 11035e72e..9938f0f3d 100644 --- a/src/llama-sampling.cpp +++ b/src/llama-sampling.cpp @@ -1672,7 +1672,7 @@ static void llama_sampler_top_n_sigma_apply(struct llama_sampler * smpl, llama_t logits_sum += cur_p->data[i].logit; } float mean = (float)logits_sum/cur_p->size; - + // calculate standard deviation float acc = 0; for(size_t i = 0; i < cur_p->size; ++i){