Update README.md
Browse files
README.md
CHANGED
@@ -24,15 +24,13 @@ This repository provides a small-sized Japanese GPT-2 model. The model was train
|
|
24 |
|
25 |
# How to use 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 |
# Model architecture
|
|
|
24 |
|
25 |
# How to use the model
|
26 |
|
|
|
|
|
27 |
~~~~
|
28 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
29 |
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("rinna/japanese-gpt2-small", use_fast=False)
|
31 |
tokenizer.do_lower_case = True # due to some bug of tokenizer config loading
|
32 |
|
33 |
+
model = AutoModelForCausalLM.from_pretrained("rinna/japanese-gpt2-small")
|
34 |
~~~~
|
35 |
|
36 |
# Model architecture
|