From 5a16205274b0b25c3d7a4e1221cd2841e19fa61b Mon Sep 17 00:00:00 2001 From: Howard Su Date: Tue, 27 Jun 2023 19:48:07 +0800 Subject: [PATCH] Missing one place to replace -1 with default seed constant --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index b5c9c18d5..94ec3807e 100644 --- a/llama.cpp +++ b/llama.cpp @@ -3092,7 +3092,7 @@ int llama_get_kv_cache_token_count(const struct llama_context * ctx) { #define LLAMA_MAX_RNG_STATE (64*1024) void llama_set_rng_seed(struct llama_context * ctx, unsigned int seed) { - if (seed == -1) { + if (seed == LLAMA_DEFAULT_SEED) { seed = time(NULL); } ctx->rng.seed(seed);