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
fb1c8db7
Unverified
Commit
fb1c8db7
authored
Nov 07, 2022
by
Sylvain Gugger
Committed by
GitHub
Nov 07, 2022
Browse files
Fix AutoTokenizer with subfolder passed (#20110)
parent
6156bffa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/transformers/models/auto/tokenization_auto.py
src/transformers/models/auto/tokenization_auto.py
+5
-0
No files found.
src/transformers/models/auto/tokenization_auto.py
View file @
fb1c8db7
...
...
@@ -348,6 +348,7 @@ def get_tokenizer_config(
use_auth_token
:
Optional
[
Union
[
bool
,
str
]]
=
None
,
revision
:
Optional
[
str
]
=
None
,
local_files_only
:
bool
=
False
,
subfolder
:
str
=
""
,
**
kwargs
,
):
"""
...
...
@@ -383,6 +384,9 @@ def get_tokenizer_config(
identifier allowed by git.
local_files_only (`bool`, *optional*, defaults to `False`):
If `True`, will only try to load the tokenizer configuration from local files.
subfolder (`str`, *optional*, defaults to `""`):
In case the tokenizer config is located inside a subfolder of the model repo on huggingface.co, you can
specify the folder name here.
<Tip>
...
...
@@ -419,6 +423,7 @@ def get_tokenizer_config(
use_auth_token
=
use_auth_token
,
revision
=
revision
,
local_files_only
=
local_files_only
,
subfolder
=
subfolder
,
_raise_exceptions_for_missing_entries
=
False
,
_raise_exceptions_for_connection_errors
=
False
,
_commit_hash
=
commit_hash
,
...
...
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