logo
Browse Source

Optimize triton

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

4
auto_transformers.py

@ -128,12 +128,12 @@ class AutoTransformers(NNOperator):
log.error(f'Fail to tokenize inputs: {e}')
raise e
try:
outs = self.model(**inputs)
outs = self.model(**inputs).to('cpu')
except Exception as e:
log.error(f'Invalid input for the model: {self.model_name}')
raise e
outs = self.post_proc(outs, inputs)
features = outs.cpu().detach().numpy()
features = outs.detach().numpy()
if isinstance(data, str):
features = features.squeeze(0)
else:

Loading…
Cancel
Save