From 8ba2cb6d32b9be154ca0625abe827fe290e5e55d Mon Sep 17 00:00:00 2001 From: daniel-z-kaplan <48258016+daniel-z-kaplan@users.noreply.github.com> Date: Tue, 23 May 2023 14:23:45 -0400 Subject: [PATCH] Update example_inference.py Set seed --- example_inference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example_inference.py b/example_inference.py index 9446f0f..afa82d0 100644 --- a/example_inference.py +++ b/example_inference.py @@ -34,14 +34,16 @@ ## returns a tensor of shape: (1, 149, 4096) embeddings = model.preprocess_inputs(inputs) - + + + torch.manual_seed(0) ## returns a list of length embeddings.shape[0] (batch size) res = "" while res == "": output = model.generate( embeddings = embeddings, max_steps = 6, - temperature = 0.7, + temperature = 0.1, top_k = 0, )