aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNigel Bosch <pnigelb@gmail.com>2023-07-04 18:33:33 -0500
committerGitHub <noreply@github.com>2023-07-05 07:33:33 +0800
commit7f0e9a775ecc4c6ade271c217f63d6dc93e79eaa (patch)
treeee5078b89714f048559195c695a976f5f61bfa46 /examples
parentb472f3fca558b6335adbd87210ed58cfb5da37cb (diff)
embd-input: Fix input embedding example unsigned int seed (#2105)
Diffstat (limited to 'examples')
-rw-r--r--examples/embd-input/embd-input-lib.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/embd-input/embd-input-lib.cpp b/examples/embd-input/embd-input-lib.cpp
index 570e273..5fa4942 100644
--- a/examples/embd-input/embd-input-lib.cpp
+++ b/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);