Update README.md
Browse files
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]))
|