Guanzheng commited on
Commit
bd11797
1 Parent(s): 91f64f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -47,7 +47,12 @@ if not torch.cuda.is_available():
47
  # if torch.cuda.is_available():
48
  model_id = "DAMO-NLP-SG/CLEX-7b-Chat-16K"
49
  from transformers import AutoModelForCausalLM
50
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True)
 
 
 
 
 
51
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
52
  tokenizer.use_default_system_prompt = False
53
 
 
47
  # if torch.cuda.is_available():
48
  model_id = "DAMO-NLP-SG/CLEX-7b-Chat-16K"
49
  from transformers import AutoModelForCausalLM
50
+ from modeling_llama import LlamaForCausalLM
51
+ # from configuration_clex import CLEXLlamaConfig
52
+ # config = CLEXLlamaConfig.from_pretrained(
53
+ # model_id
54
+ # )
55
+ model = LlamaForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True)
56
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
57
  tokenizer.use_default_system_prompt = False
58