From b8c8dda75fdf5fdea49c80af36818e7c30fe0ddf Mon Sep 17 00:00:00 2001 From: Howard Su Date: Thu, 29 Jun 2023 21:15:15 +0800 Subject: Use unsigned for random seed (#2006) * Use unsigned for random seed. Keep -1 as the value to use a time based seed. Co-authored-by: Georgi Gerganov --- examples/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/common.h') diff --git a/examples/common.h b/examples/common.h index 9d213d6d..66e56729 100644 --- a/examples/common.h +++ b/examples/common.h @@ -22,7 +22,7 @@ int32_t get_num_physical_cores(); struct gpt_params { - int32_t seed = -1; // RNG seed + uint32_t seed = -1; // RNG seed int32_t n_threads = get_num_physical_cores(); int32_t n_predict = -1; // new tokens to predict int32_t n_ctx = 512; // context size -- cgit v1.2.3