shiyemin2 commited on
Commit
fa0f42c
β€’
1 Parent(s): cef1f39

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -1
model.py CHANGED
@@ -14,7 +14,8 @@ if torch.cuda.is_available():
14
  model = AutoModelForCausalLM.from_pretrained(
15
  model_id,
16
  load_in_4bit=True,
17
- torch_dtype=torch.float16
 
18
  )
19
  else:
20
  model = AutoModelForCausalLM.from_pretrained(
 
14
  model = AutoModelForCausalLM.from_pretrained(
15
  model_id,
16
  load_in_4bit=True,
17
+ torch_dtype=torch.float16,
18
+ device_map='auto'
19
  )
20
  else:
21
  model = AutoModelForCausalLM.from_pretrained(