Update README.md
Browse files
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
|
31 |
|
32 |
-
tokenizer =
|
33 |
tokenizer.do_lower_case = True # due to some bug of tokenizer config loading
|
34 |
|
35 |
-
model =
|
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
|