shivrajkarewar commited on
Commit
52f4dd5
·
verified ·
1 Parent(s): e53b86a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -17,11 +17,12 @@ try:
17
  trust_remote_code=True # <-- ADDED HERE
18
  )
19
  model = AutoModelForCausalLM.from_pretrained(
20
- MODEL_NAME,
21
- device_map="auto",
22
- torch_dtype="auto",
23
- trust_remote_code=True, # <-- ADDED HERE
24
- # load_in_4bit=True # Uncomment for quantization
 
25
  )
26
  except Exception as e:
27
  raise gr.Error(f"Error loading model: {str(e)}")
 
17
  trust_remote_code=True # <-- ADDED HERE
18
  )
19
  model = AutoModelForCausalLM.from_pretrained(
20
+ MODEL_NAME,
21
+ device_map="auto",
22
+ torch_dtype="auto",
23
+ trust_remote_code=True,
24
+ use_flash_attention_2=True, # <-- Add this line
25
+ # load_in_4bit=True
26
  )
27
  except Exception as e:
28
  raise gr.Error(f"Error loading model: {str(e)}")