winglian commited on
Commit
a617f1b
2 Parent(s): cf48ff7 a8771b0

Merge pull request #44 from OpenAccess-AI-Collective/qlora-add-modules-tuple

Browse files
Files changed (1) hide show
  1. src/axolotl/utils/models.py +3 -3
src/axolotl/utils/models.py CHANGED
@@ -363,13 +363,13 @@ def load_lora(model, cfg):
363
  )
364
 
365
  bits = None
366
- if cfg.cfg.load_in_4bits:
367
  bits = 4
368
- elif cfg.cfg.load_in_8bits:
369
  bits = 8
370
  linear_names = find_all_linear_names(bits, model)
371
  logging.info(f"found linear modules: {repr(linear_names)}")
372
- lora_target_modules = cfg.lora_target_modules + linear_names
373
 
374
  lora_config = LoraConfig(
375
  r=cfg.lora_r,
 
363
  )
364
 
365
  bits = None
366
+ if cfg.cfg.load_in_4bits:
367
  bits = 4
368
+ elif cfg.cfg.load_in_8bits:
369
  bits = 8
370
  linear_names = find_all_linear_names(bits, model)
371
  logging.info(f"found linear modules: {repr(linear_names)}")
372
+ lora_target_modules = list(cfg.lora_target_modules) + linear_names
373
 
374
  lora_config = LoraConfig(
375
  r=cfg.lora_r,