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
3716c3d8
Unverified
Commit
3716c3d8
authored
Feb 24, 2020
by
Lysandre Debut
Committed by
GitHub
Feb 24, 2020
Browse files
False by default (#3002)
parent
f9ec5ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/tokenization_auto.py
src/transformers/tokenization_auto.py
+2
-2
No files found.
src/transformers/tokenization_auto.py
View file @
3716c3d8
...
@@ -157,7 +157,7 @@ class AutoTokenizer:
...
@@ -157,7 +157,7 @@ class AutoTokenizer:
A dictionary of proxy servers to use by protocol or endpoint, e.g.: {'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}.
A dictionary of proxy servers to use by protocol or endpoint, e.g.: {'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}.
The proxies are used on each request.
The proxies are used on each request.
use_fast: (`optional`) boolean, default
Tru
e:
use_fast: (`optional`) boolean, default
Fals
e:
Indicate if transformers should try to load the fast version of the tokenizer (True) or use the Python one (False).
Indicate if transformers should try to load the fast version of the tokenizer (True) or use the Python one (False).
inputs: (`optional`) positional arguments: will be passed to the Tokenizer ``__init__`` method.
inputs: (`optional`) positional arguments: will be passed to the Tokenizer ``__init__`` method.
...
@@ -183,7 +183,7 @@ class AutoTokenizer:
...
@@ -183,7 +183,7 @@ class AutoTokenizer:
if
"bert-base-japanese"
in
pretrained_model_name_or_path
:
if
"bert-base-japanese"
in
pretrained_model_name_or_path
:
return
BertJapaneseTokenizer
.
from_pretrained
(
pretrained_model_name_or_path
,
*
inputs
,
**
kwargs
)
return
BertJapaneseTokenizer
.
from_pretrained
(
pretrained_model_name_or_path
,
*
inputs
,
**
kwargs
)
use_fast
=
kwargs
.
pop
(
"use_fast"
,
Tru
e
)
use_fast
=
kwargs
.
pop
(
"use_fast"
,
Fals
e
)
for
config_class
,
(
tokenizer_class_py
,
tokenizer_class_fast
)
in
TOKENIZER_MAPPING
.
items
():
for
config_class
,
(
tokenizer_class_py
,
tokenizer_class_fast
)
in
TOKENIZER_MAPPING
.
items
():
if
isinstance
(
config
,
config_class
):
if
isinstance
(
config
,
config_class
):
if
tokenizer_class_fast
and
use_fast
:
if
tokenizer_class_fast
and
use_fast
:
...
...
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