Skip to content

Commit 3f16747

Browse files
authored
sampling : use std::random_device{}() for default random seed (ggml-org#6962)
1 parent 3055a41 commit 3f16747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void llama_sampling_reset(llama_sampling_context * ctx) {
6868

6969
void llama_sampling_set_rng_seed(struct llama_sampling_context * ctx, uint32_t seed) {
7070
if (seed == LLAMA_DEFAULT_SEED) {
71-
seed = time(NULL);
71+
seed = std::random_device{}();
7272
}
7373
ctx->rng.seed(seed);
7474
}

0 commit comments

Comments
 (0)