log sampler init values

This commit is contained in:
ddh0 2025-12-14 23:14:51 -06:00
parent 1c58e9a96a
commit 4e04bd1ce2
1 changed files with 9 additions and 6 deletions

View File

@ -2466,12 +2466,15 @@ struct llama_sampler * llama_sampler_init_power_law(
float decay,
uint32_t seed
) {
const float _decay = std::min(decay, 0.99f);
fprintf(stderr, "power-law: init: target %.3f, decay %.3f\n", (double)target, (double)_decay);
fflush(stderr);
auto seed_cur = get_rng_seed(seed);
return llama_sampler_init(
/* .iface = */ &llama_sampler_power_law_i,
/* .ctx = */ new llama_sampler_power_law {
/* .target = */ target,
/* .decay = */ std::min(decay, 0.99f),
/* .decay = */ _decay,
/* .seed = */ seed_cur,
/* .rng = */ std::mt19937(seed_cur),
/* .weighted_sum = */ 0.0f,