use std::random_device{}() for default random seed

This commit is contained in:
David Renshaw 2024-04-28 08:26:46 -04:00
parent 6e472f58e4
commit 53e505d504

View file

@ -68,7 +68,7 @@ void llama_sampling_reset(llama_sampling_context * ctx) {
void llama_sampling_set_rng_seed(struct llama_sampling_context * ctx, uint32_t seed) {
if (seed == LLAMA_DEFAULT_SEED) {
seed = time(NULL);
seed = std::random_device{}();
}
ctx->rng.seed(seed);
}