From ee8ec608d590d0c52639f445da8d40b5bdc765f8 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Fri, 6 Jan 2023 14:26:18 +0800 Subject: [PATCH] Fix for model without pad Signed-off-by: Jael Gu --- auto_transformers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_transformers.py b/auto_transformers.py index e5255de..e3fb185 100644 --- a/auto_transformers.py +++ b/auto_transformers.py @@ -104,7 +104,7 @@ class AutoTransformers(NNOperator): try: inputs = self.tokenizer(txt, padding=True, truncation=True, return_tensors="pt").to(self.device) except Exception: - inputs = self.tokenizer(dummy_input, truncation=True, return_tensors='pt').to(self.device) + inputs = self.tokenizer(txt, truncation=True, return_tensors='pt').to(self.device) try: outs = self.model(**inputs) except Exception as e: