From a697f496989765ad412cc82a737316937a5cd70b Mon Sep 17 00:00:00 2001 From: Florin Tobler Date: Mon, 13 Jan 2025 23:33:22 +0100 Subject: [PATCH] whitespace --- inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inference.py b/inference.py index 005c74d..1401f81 100644 --- a/inference.py +++ b/inference.py @@ -101,7 +101,7 @@ class Inference: if print_stdout: print(out_text) return outputs, out_text - + def generate_incremental_2(self, input_ids: torch.Tensor, print_stdout:bool=True) -> tuple[torch.Tensor, str]: generated_tokens = input_ids @@ -180,7 +180,7 @@ class Inference: while True: # Call the model with the current tokens outputs = self.model( - input_ids=generated_tokens, + input_ids=generated_tokens, use_cache=True, num_beams = 1 # past_key_values=past_key_values