Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
35e2d13f
Unverified
Commit
35e2d13f
authored
May 25, 2022
by
Cookie_thief
Committed by
GitHub
May 25, 2022
Browse files
Upd AutoTokenizer.from_pretrained doc examples (#17416)
parent
897a8dd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/transformers/models/auto/tokenization_auto.py
src/transformers/models/auto/tokenization_auto.py
+3
-0
No files found.
src/transformers/models/auto/tokenization_auto.py
View file @
35e2d13f
...
...
@@ -474,6 +474,9 @@ class AutoTokenizer:
>>> # If vocabulary files are in a directory (e.g. tokenizer was saved using *save_pretrained('./test/saved_model/')*)
>>> tokenizer = AutoTokenizer.from_pretrained("./test/bert_saved_model/")
>>> # Download vocabulary from huggingface.co and define model-specific arguments
>>> tokenizer = AutoTokenizer.from_pretrained("roberta-base", add_prefix_space=True)
```"""
config
=
kwargs
.
pop
(
"config"
,
None
)
kwargs
[
"_from_auto"
]
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment