yangliu commited on
Commit
ee0eb23
·
1 Parent(s): 24961c0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -4,15 +4,15 @@ license: apache-2.0
4
  单论对话机器人
5
  调用方式
6
 
7
- from transformers import BloomForCausalLM, BloomTokenizerFast
8
 
9
 
10
  checkpoint = "model"
11
 
12
 
13
- tokenizer = BloomTokenizerFast.from_pretrained(checkpoint)
14
 
15
- model = BloomForCausalLM.from_pretrained(checkpoint).cuda()
16
 
17
  text = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{你想问的文本}\n\n### Response:'
18
 
 
4
  单论对话机器人
5
  调用方式
6
 
7
+ from transformers import AutoModelForCausalLM, AutoTokenizer
8
 
9
 
10
  checkpoint = "model"
11
 
12
 
13
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
14
 
15
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).cuda()
16
 
17
  text = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{你想问的文本}\n\n### Response:'
18