Skip to content

Commit

Permalink
Fix tokenizer for XLMRobertaXL (#19004)
Browse files Browse the repository at this point in the history
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
ydshieh and ydshieh authored Sep 13, 2022
1 parent 2848c9c commit 2886f7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/transformers/models/auto/tokenization_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,13 @@
"XLMRobertaTokenizerFast" if is_tokenizers_available() else None,
),
),
("xlm-roberta-xl", ("RobertaTokenizer", "RobertaTokenizerFast" if is_tokenizers_available() else None)),
(
"xlm-roberta-xl",
(
"XLMRobertaTokenizer" if is_sentencepiece_available() else None,
"XLMRobertaTokenizerFast" if is_tokenizers_available() else None,
),
),
(
"xlnet",
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

_CHECKPOINT_FOR_DOC = "xlm-roberta-xlarge"
_CONFIG_FOR_DOC = "XLMRobertaXLConfig"
_TOKENIZER_FOR_DOC = "RobertaTokenizer"
_TOKENIZER_FOR_DOC = "XLMRobertaTokenizer"

XLM_ROBERTA_XL_PRETRAINED_MODEL_ARCHIVE_LIST = [
"facebook/xlm-roberta-xl",
Expand Down

0 comments on commit 2886f7f

Please sign in to comment.