pszemraj commited on
Commit
2956200
1 Parent(s): 1d3a103

set to eval

Browse files

Signed-off-by: peter szemraj <[email protected]>

Files changed (1) hide show
  1. summarize.py +3 -0
summarize.py CHANGED
@@ -21,9 +21,12 @@ def load_model_and_tokenizer(model_name):
21
  # low_cpu_mem_usage=True,
22
  # use_cache=False,
23
  ).to(device)
 
 
24
  tokenizer = AutoTokenizer.from_pretrained(model_name)
25
 
26
  logging.info(f"Loaded model {model_name} to {device}")
 
27
  return model, tokenizer
28
 
29
 
 
21
  # low_cpu_mem_usage=True,
22
  # use_cache=False,
23
  ).to(device)
24
+ model = model.eval()
25
+
26
  tokenizer = AutoTokenizer.from_pretrained(model_name)
27
 
28
  logging.info(f"Loaded model {model_name} to {device}")
29
+
30
  return model, tokenizer
31
 
32