Merge branch 'main' into refactor/rename-4b-to-gptq
This commit is contained in:
@@ -364,7 +364,7 @@ def load_lora(model, cfg):
|
||||
PeftModel,
|
||||
)
|
||||
|
||||
lora_target_modules = list(cfg.lora_target_modules)
|
||||
lora_target_modules = list(cfg.lora_target_modules or [])
|
||||
|
||||
if cfg.lora_target_linear:
|
||||
bits = None
|
||||
|
||||
@@ -8,12 +8,12 @@ def validate_config(cfg):
|
||||
if cfg.adapter == "qlora":
|
||||
if cfg.merge_lora:
|
||||
# can't merge qlora if loaded in 8bit or 4bit
|
||||
assert cfg.load_in_8bit is False
|
||||
assert cfg.gptq is False
|
||||
assert cfg.load_in_4bit is False
|
||||
assert cfg.load_in_8bit is not True
|
||||
assert cfg.gptq is not True
|
||||
assert cfg.load_in_4bit is not True
|
||||
else:
|
||||
assert cfg.load_in_8bit is False
|
||||
assert cfg.gptq is False
|
||||
assert cfg.load_in_8bit is not True
|
||||
assert cfg.gptq is not True
|
||||
assert cfg.load_in_4bit is True
|
||||
|
||||
if not cfg.load_in_8bit and cfg.adapter == "lora":
|
||||
|
||||
Reference in New Issue
Block a user