diff --git a/src/llama-sampling.cpp b/src/llama-sampling.cpp index 57779a739..2be5a1b7f 100644 --- a/src/llama-sampling.cpp +++ b/src/llama-sampling.cpp @@ -1085,8 +1085,8 @@ static void llama_sample_xtc_apply(struct llama_sampler * smpl, llama_token_data return; } - std::uniform_real_distribution distance(0.0f, 1.0f); - float chance = distance(ctx->rng); + std::uniform_real_distribution distribution(0.0f, 1.0f); + float chance = distribution(ctx->rng); if (chance > ctx->probability) return; // in case it's not sorted/recalculated yet diff --git a/tests/test-sampling.cpp b/tests/test-sampling.cpp index c0c7e127d..0368aca9b 100644 --- a/tests/test-sampling.cpp +++ b/tests/test-sampling.cpp @@ -285,7 +285,7 @@ static void bench(llama_sampler * cnstr, const char * cnstr_name, const std::vec } const int64_t t_end = ggml_time_us(); llama_sampler_free(cnstr); - printf("%-47s: %8.3f us/iter\n", cnstr_name, (t_end - t_start) / (float)n_iter); + printf("%-43s: %8.3f us/iter\n", cnstr_name, (t_end - t_start) / (float)n_iter); } #define BENCH(__cnstr, __data, __n_iter) bench((__cnstr), #__cnstr, (__data), (__n_iter))