Wenye He commited on
Commit
c5b2064
·
verified ·
1 Parent(s): 7d2f2eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,10 +39,10 @@ class ChatModel:
39
 
40
  model = AutoModelForCausalLM.from_pretrained(
41
  config["model_name"],
42
- quantization_config=bnb_config,
43
  device_map="auto",
44
- attn_implementation="flash_attention_2" if "phi-3" in model_name else None,
45
- torch_dtype=torch.float16
 
46
  )
47
 
48
  self.models[model_name] = model
 
39
 
40
  model = AutoModelForCausalLM.from_pretrained(
41
  config["model_name"],
 
42
  device_map="auto",
43
+ torch_dtype=torch.float16,
44
+ attn_implementation="flash_attention_2" if "phi-3" in model_name else "eager",
45
+ low_cpu_mem_usage=True
46
  )
47
 
48
  self.models[model_name] = model