diff --git a/common/sampling.cpp b/common/sampling.cpp index 9d58c1680..1c56999a3 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -132,7 +132,7 @@ std::string common_params_sampling::print() const { "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, top_n_sigma = %d, temp = %.3f\n" - "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f,", + "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, top_n_sigma, temp, diff --git a/src/llama-sampling.cpp b/src/llama-sampling.cpp index e91401d75..eeba3aa7e 100644 --- a/src/llama-sampling.cpp +++ b/src/llama-sampling.cpp @@ -301,7 +301,6 @@ static void llama_sampler_top_k_impl(llama_token_data_array * cur_p, int32_t k) cur_p->size = k; } - static uint32_t get_rng_seed(uint32_t seed) { if (seed == LLAMA_DEFAULT_SEED) { // use system clock if std::random_device is not a true RNG @@ -1677,7 +1676,7 @@ static void llama_sampler_top_n_sigma_apply(struct llama_sampler * smpl, llama_t acc += pow(cur_p->data[i].logit - mean, 2); } float std = sqrt((float)acc/cur_p->size); - + //apply mask for(size_t i = 0; i < cur_p->size; ++i){ if(cur_p->data[i].logit < max - ((float)ctx->n * std)) {