khurrameycon commited on
Commit
6913d77
·
verified ·
1 Parent(s): cdde504

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -117,8 +117,10 @@ try:
117
  model = AutoModelForCausalLM.from_pretrained(
118
  base_model_path,
119
  torch_dtype=torch.float16,
120
- trust_remote_code=True,
121
- device_map="auto"
 
 
122
  )
123
 
124
  # Load tokenizer
 
117
  model = AutoModelForCausalLM.from_pretrained(
118
  base_model_path,
119
  torch_dtype=torch.float16,
120
+ device_map="cpu", # Explicitly set CPU
121
+ load_in_8bit=True # Enable int8 quantization
122
+ # trust_remote_code=True,
123
+ # device_map="auto"
124
  )
125
 
126
  # Load tokenizer