tianyuz commited on
Commit
80adab4
1 Parent(s): a629248

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -5
README.md CHANGED
@@ -24,15 +24,13 @@ This repository provides a base-sized Japanese RoBERTa model. The model was trai
24
 
25
  # How to load the model
26
 
27
- *NOTE:* Use `T5Tokenizer` to initiate the tokenizer.
28
-
29
  ~~~~
30
- from transformers import T5Tokenizer, RobertaForMaskedLM
31
 
32
- tokenizer = T5Tokenizer.from_pretrained("rinna/japanese-roberta-base")
33
  tokenizer.do_lower_case = True # due to some bug of tokenizer config loading
34
 
35
- model = RobertaForMaskedLM.from_pretrained("rinna/japanese-roberta-base")
36
  ~~~~
37
 
38
  # How to use the model for masked token prediction
 
24
 
25
  # How to load the model
26
 
 
 
27
  ~~~~
28
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
29
 
30
+ tokenizer = AutoTokenizer.from_pretrained("rinna/japanese-roberta-base", use_fast=False)
31
  tokenizer.do_lower_case = True # due to some bug of tokenizer config loading
32
 
33
+ model = AutoModelForMaskedLM.from_pretrained("rinna/japanese-roberta-base")
34
  ~~~~
35
 
36
  # How to use the model for masked token prediction