Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trust_remote_code to tokenizer construction #1176

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/deepsparse/transformers/pipelines/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down