Missing one place to replace -1 with default seed constant

This commit is contained in:
Howard Su 2023-06-27 19:48:07 +08:00
parent 74fe5fc1ea
commit 5a16205274

View file

@ -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);