logo
Browse Source

Fix for model without pad

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 1 year ago
parent
commit
ee8ec608d5
  1. 2
      auto_transformers.py

2
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:

Loading…
Cancel
Save