IEIT-Yuan commited on
Commit
6a8f718
1 Parent(s): 3321998

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -46,7 +46,7 @@ tokenizer = LlamaTokenizer.from_pretrained('IEITYuan/Yuan2-51B-hf')
46
  tokenizer.add_tokens(['<sep>', '<pad>', '<mask>', '<predict>', '<FIM_SUFFIX>', '<FIM_PREFIX>', '<FIM_MIDDLE>','<commit_before>','<commit_msg>','<commit_after>','<jupyter_start>','<jupyter_text>','<jupyter_code>','<jupyter_output>','<empty_output>'], special_tokens=True)
47
 
48
  print("Creat model...")
49
- model = AutoModelForCausalLM.from_pretrained('IEITYuan/Yuan2.0-51B-hf',device_map='auto',torch_dtype=torch.bfloat16,trust_remote_code=True)
50
 
51
  inputs = tokenizer("请问目前最先进的机器学习算法有哪些?", return_tensors="pt")["input_ids"].to("cuda:0")
52
  outputs = model.generate(inputs,do_sample=False,max_length=100)
 
46
  tokenizer.add_tokens(['<sep>', '<pad>', '<mask>', '<predict>', '<FIM_SUFFIX>', '<FIM_PREFIX>', '<FIM_MIDDLE>','<commit_before>','<commit_msg>','<commit_after>','<jupyter_start>','<jupyter_text>','<jupyter_code>','<jupyter_output>','<empty_output>'], special_tokens=True)
47
 
48
  print("Creat model...")
49
+ model = AutoModelForCausalLM.from_pretrained('IEITYuan/Yuan2-51B-hf',device_map='auto',torch_dtype=torch.bfloat16,trust_remote_code=True)
50
 
51
  inputs = tokenizer("请问目前最先进的机器学习算法有哪些?", return_tensors="pt")["input_ids"].to("cuda:0")
52
  outputs = model.generate(inputs,do_sample=False,max_length=100)