Skip to content

Commit 3613a6d

Browse files
committed
Renamed random distribution
1 parent 436a991 commit 3613a6d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/llama-sampling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,8 @@ static void llama_sample_xtc_apply(struct llama_sampler * smpl, llama_token_data
10851085
return;
10861086
}
10871087

1088-
std::uniform_real_distribution<float> distance(0.0f, 1.0f);
1089-
float chance = distance(ctx->rng);
1088+
std::uniform_real_distribution<float> distribution(0.0f, 1.0f);
1089+
float chance = distribution(ctx->rng);
10901090
if (chance > ctx->probability) return;
10911091

10921092
// in case it's not sorted/recalculated yet

tests/test-sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static void bench(llama_sampler * cnstr, const char * cnstr_name, const std::vec
285285
}
286286
const int64_t t_end = ggml_time_us();
287287
llama_sampler_free(cnstr);
288-
printf("%-47s: %8.3f us/iter\n", cnstr_name, (t_end - t_start) / (float)n_iter);
288+
printf("%-43s: %8.3f us/iter\n", cnstr_name, (t_end - t_start) / (float)n_iter);
289289
}
290290

291291
#define BENCH(__cnstr, __data, __n_iter) bench((__cnstr), #__cnstr, (__data), (__n_iter))

0 commit comments

Comments
 (0)