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