Add 4-bit LoRA support (#1200)
This commit is contained in:
parent
ec3e869c27
commit
39099663a0
7 changed files with 100 additions and 34 deletions
|
@ -43,7 +43,8 @@ def add_lora_to_model(lora_names):
|
|||
shared.model.load_adapter(Path(f"{shared.args.lora_dir}/{lora}"), lora)
|
||||
|
||||
if not shared.args.load_in_8bit and not shared.args.cpu:
|
||||
shared.model.half()
|
||||
if not shared.args.monkey_patch:
|
||||
shared.model.half()
|
||||
if not hasattr(shared.model, "hf_device_map"):
|
||||
if torch.has_mps:
|
||||
device = torch.device('mps')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue