justinj92 commited on
Commit
d8473c0
1 Parent(s): 15d1edb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -24,12 +24,14 @@ quantization_config = BitsAndBytesConfig(
24
  bnb_4bit_use_double_quant=True,
25
  bnb_4bit_quant_type="nf4")
26
 
27
- tokenizer = AutoTokenizer.from_pretrained(MODEL_ID1)
28
  model = AutoModelForCausalLM.from_pretrained(
29
  MODEL_ID1,
30
  torch_dtype=torch.bfloat16,
31
  device_map="auto",
32
- quantization_config=quantization_config)
 
 
33
 
34
  # Chatbot tab function
35
  @spaces.GPU()
 
24
  bnb_4bit_use_double_quant=True,
25
  bnb_4bit_quant_type="nf4")
26
 
27
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID1, trust_remote_code=True)
28
  model = AutoModelForCausalLM.from_pretrained(
29
  MODEL_ID1,
30
  torch_dtype=torch.bfloat16,
31
  device_map="auto",
32
+ quantization_config=quantization_config,
33
+ trust_remote_code=True
34
+ )
35
 
36
  # Chatbot tab function
37
  @spaces.GPU()