Merge pull request #187 from OpenAccess-AI-Collective/strip-peft-device-map
Browse files
src/axolotl/utils/models.py
CHANGED
@@ -364,7 +364,6 @@ def load_llama_adapter(model, cfg):
|
|
364 |
model = PeftModel.from_pretrained(
|
365 |
model,
|
366 |
cfg.lora_model_dir,
|
367 |
-
device_map=cfg.device_map,
|
368 |
torch_dtype=torch.float16,
|
369 |
)
|
370 |
else:
|
@@ -427,8 +426,6 @@ def load_lora(model, cfg):
|
|
427 |
model,
|
428 |
cfg.lora_model_dir,
|
429 |
is_trainable=not cfg.inference,
|
430 |
-
device_map=cfg.device_map,
|
431 |
-
# torch_dtype=torch.float16,
|
432 |
)
|
433 |
else:
|
434 |
model = get_peft_model(model, lora_config)
|
|
|
364 |
model = PeftModel.from_pretrained(
|
365 |
model,
|
366 |
cfg.lora_model_dir,
|
|
|
367 |
torch_dtype=torch.float16,
|
368 |
)
|
369 |
else:
|
|
|
426 |
model,
|
427 |
cfg.lora_model_dir,
|
428 |
is_trainable=not cfg.inference,
|
|
|
|
|
429 |
)
|
430 |
else:
|
431 |
model = get_peft_model(model, lora_config)
|