jedyang97 commited on
Commit
d419c1d
1 Parent(s): 2454e23

disable cuda in main

Browse files
Files changed (1) hide show
  1. llava/model/builder.py +2 -2
llava/model/builder.py CHANGED
@@ -138,7 +138,7 @@ def load_pretrained_model(
138
  from peft import PeftModel
139
 
140
  print("Loading LoRA weights...")
141
- model = PeftModel.from_pretrained(model, model_path)
142
  print("Merging LoRA weights...")
143
  model = model.merge_and_unload()
144
  print("Model is loaded...")
@@ -200,7 +200,7 @@ def load_pretrained_model(
200
  device_map=device_map,
201
  )
202
  print(f"Loading LoRA weights from {model_path}")
203
- model = PeftModel.from_pretrained(model, model_path)
204
  print(f"Merging weights")
205
  model = model.merge_and_unload()
206
  print("Convert to BF16...")
 
138
  from peft import PeftModel
139
 
140
  print("Loading LoRA weights...")
141
+ model = PeftModel.from_pretrained(model, model_path, device_map=device_map)
142
  print("Merging LoRA weights...")
143
  model = model.merge_and_unload()
144
  print("Model is loaded...")
 
200
  device_map=device_map,
201
  )
202
  print(f"Loading LoRA weights from {model_path}")
203
+ model = PeftModel.from_pretrained(model, model_path, device_map=device_map)
204
  print(f"Merging weights")
205
  model = model.merge_and_unload()
206
  print("Convert to BF16...")