mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 05:48:47 +01:00
sampling : use std::random_device{}() for default random seed (#6962)
This commit is contained in:
parent
3055a41805
commit
3f167476b1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user