Skip to content

Commit d905a9e

Browse files
committed
cleaned up pr
1 parent 54ef105 commit d905a9e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

common/sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ std::string common_params_sampling::print() const {
132132
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n"
133133
"\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n"
134134
"\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"
135-
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f,",
135+
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f",
136136
penalty_last_n, penalty_repeat, penalty_freq, penalty_present,
137137
dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n,
138138
top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, top_n_sigma, temp,

src/llama-sampling.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ static void llama_sampler_top_k_impl(llama_token_data_array * cur_p, int32_t k)
301301
cur_p->size = k;
302302
}
303303

304-
305304
static uint32_t get_rng_seed(uint32_t seed) {
306305
if (seed == LLAMA_DEFAULT_SEED) {
307306
// 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
16771676
acc += pow(cur_p->data[i].logit - mean, 2);
16781677
}
16791678
float std = sqrt((float)acc/cur_p->size);
1680-
1679+
16811680
//apply mask
16821681
for(size_t i = 0; i < cur_p->size; ++i){
16831682
if(cur_p->data[i].logit < max - ((float)ctx->n * std)) {

0 commit comments

Comments
 (0)