Guanzheng commited on
Commit
72abb1e
1 Parent(s): 1342086

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -40,7 +40,7 @@ import torch
40
  from transformers import AutoTokenizer, AutoModelForCausalLM
41
 
42
  tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-SG/CLEX-Phi-2-2.7B-32K", trust_remote_code=True)
43
- model = AutoModelForCausalLM.from_pretrained("DAMO-NLP-SG/CLEX-Phi-2-2.7B-32K", torch_dtype=torch.bfloat16)
44
  inputs = tokenizer("What is CLEX?", return_tensors="pt")
45
  sample = model.generate(**inputs, max_length=128)
46
  print(tokenizer.decode(sample[0]))
 
40
  from transformers import AutoTokenizer, AutoModelForCausalLM
41
 
42
  tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-SG/CLEX-Phi-2-2.7B-32K", trust_remote_code=True)
43
+ model = AutoModelForCausalLM.from_pretrained("DAMO-NLP-SG/CLEX-Phi-2-2.7B-32K", torch_dtype=torch.bfloat16, trust_remote_code=True)
44
  inputs = tokenizer("What is CLEX?", return_tensors="pt")
45
  sample = model.generate(**inputs, max_length=128)
46
  print(tokenizer.decode(sample[0]))