tianyuz commited on
Commit
3f0d0af
1 Parent(s): 8e5d4b4

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 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 T5Tokenizer, GPT2LMHeadModel
31
 
32
- tokenizer = T5Tokenizer.from_pretrained("rinna/japanese-gpt2-small")
33
  tokenizer.do_lower_case = True # due to some bug of tokenizer config loading
34
 
35
- model = GPT2LMHeadModel.from_pretrained("rinna/japanese-gpt2-small")
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