Browse Source

embd-input: Fix input embedding example unsigned int seed (#2105)

Nigel Bosch 2 years ago
parent
commit
7f0e9a775e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/embd-input/embd-input-lib.cpp

+ 1 - 1
examples/embd-input/embd-input-lib.cpp

@@ -29,7 +29,7 @@ struct MyModel* create_mymodel(int argc, char ** argv) {
 
     fprintf(stderr, "%s: build = %d (%s)\n", __func__, BUILD_NUMBER, BUILD_COMMIT);
 
-    if (params.seed < 0) {
+    if (params.seed == LLAMA_DEFAULT_SEED) {
         params.seed = time(NULL);
     }
     fprintf(stderr, "%s: seed  = %d\n", __func__, params.seed);