Guanzheng commited on
Commit
8142565
1 Parent(s): 202de7d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -32,7 +32,7 @@ import torch
32
  from transformers import AutoTokenizer, AutoModelForCausalLM
33
 
34
  tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-SG/CLEX-7B-Chat-16K", trust_remote_code=True)
35
- model = AutoModelForCausalLM.from_pretrained("DAMO-NLP-SG/CLEX-7B-Chat-16K", torch_dtype=torch.bfloat16)
36
  inputs = tokenizer("What is CLEX?", return_tensors="pt")
37
  sample = model.generate(**inputs, max_length=128)
38
  print(tokenizer.decode(sample[0]))
 
32
  from transformers import AutoTokenizer, AutoModelForCausalLM
33
 
34
  tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-SG/CLEX-7B-Chat-16K", trust_remote_code=True)
35
+ model = AutoModelForCausalLM.from_pretrained("DAMO-NLP-SG/CLEX-7B-Chat-16K", torch_dtype=torch.bfloat16, trust_remote_code=True)
36
  inputs = tokenizer("What is CLEX?", return_tensors="pt")
37
  sample = model.generate(**inputs, max_length=128)
38
  print(tokenizer.decode(sample[0]))