Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit de4fb43

Browse files
authored
Add trust_remote_code to tokenizer construction (#1176)
* Add `trust_remote_code` to tokenizer construction * Style
1 parent cf9864b commit de4fb43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/deepsparse/transformers/pipelines/pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def setup_onnx_file_path(self) -> str:
122122
finetuning_task=self.task if hasattr(self, "task") else None,
123123
)
124124
self.tokenizer = AutoTokenizer.from_pretrained(
125-
tokenizer_path, model_max_length=self.sequence_length
125+
tokenizer_path,
126+
trust_remote_code=self._trust_remote_code,
127+
model_max_length=self.sequence_length,
126128
)
127129
self.config_path = os.path.join(config_path, "config.json")
128130
self.tokenizer_config_path = os.path.join(tokenizer_path, "tokenizer.json")

0 commit comments

Comments
 (0)