artificialguybr commited on
Commit
9f9b102
·
1 Parent(s): cd83399

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -10,7 +10,11 @@ import secrets
10
  from pathlib import Path
11
 
12
  tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL-Chat-Int4", trust_remote_code=True)
13
- model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat-Int4", device_map="auto", trust_remote_code=True).eval()
 
 
 
 
14
 
15
  BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>"
16
  PUNCTUATION = "!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏."
 
10
  from pathlib import Path
11
 
12
  tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-VL-Chat-Int4", trust_remote_code=True)
13
+ config = AutoConfig.from_pretrained("Qwen/Qwen-VL-Chat-Int4")
14
+ #config.quantization_config["use_exllama"] = True
15
+ config.quantization_config["disable_exllama"] = False
16
+ config.quantization_config["exllama_config"] = {"version":2}
17
+ model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-VL-Chat-Int4", device_map="auto", trust_remote_code=True, config=config).eval()
18
 
19
  BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>"
20
  PUNCTUATION = "!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏."