diff --git a/src/deepsparse/transformers/pipelines/pipeline.py b/src/deepsparse/transformers/pipelines/pipeline.py index a2eb8313f5..9e92141686 100644 --- a/src/deepsparse/transformers/pipelines/pipeline.py +++ b/src/deepsparse/transformers/pipelines/pipeline.py @@ -122,7 +122,9 @@ def setup_onnx_file_path(self) -> str: finetuning_task=self.task if hasattr(self, "task") else None, ) self.tokenizer = AutoTokenizer.from_pretrained( - tokenizer_path, model_max_length=self.sequence_length + tokenizer_path, + trust_remote_code=self._trust_remote_code, + model_max_length=self.sequence_length, ) self.config_path = os.path.join(config_path, "config.json") self.tokenizer_config_path = os.path.join(tokenizer_path, "tokenizer.json")