saakshigupta commited on
Commit
dd2241b
·
verified ·
1 Parent(s): 9d19a1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -45,11 +45,13 @@ def load_model():
45
  # Load processor
46
  processor = AutoProcessor.from_pretrained(base_model_id)
47
 
48
- # Load the pre-quantized model
49
  model = AutoModelForCausalLM.from_pretrained(
50
  base_model_id,
51
  device_map="auto",
52
- torch_dtype=torch.float16
 
 
53
  )
54
 
55
  # Load adapter
 
45
  # Load processor
46
  processor = AutoProcessor.from_pretrained(base_model_id)
47
 
48
+ # Load the pre-quantized model with unsloth settings
49
  model = AutoModelForCausalLM.from_pretrained(
50
  base_model_id,
51
  device_map="auto",
52
+ torch_dtype=torch.float16,
53
+ use_cache=True,
54
+ trust_remote_code=True
55
  )
56
 
57
  # Load adapter