Maxime tmm1 commited on
Commit
9e69968
·
unverified ·
1 Parent(s): d03887f

Update src/axolotl/utils/models.py

Browse files

Co-authored-by: Aman Gupta Karmani <[email protected]>

Files changed (1) hide show
  1. src/axolotl/utils/models.py +1 -1
src/axolotl/utils/models.py CHANGED
@@ -355,7 +355,7 @@ def load_model(
355
  if hasattr(module, "weight"):
356
  module.to(torch.float32)
357
 
358
- fix_dtype = False
359
  if not cfg.gptq and (
360
  (cfg.adapter == "lora" and load_in_8bit)
361
  or (cfg.adapter == "qlora" and cfg.load_in_4bit)
 
355
  if hasattr(module, "weight"):
356
  module.to(torch.float32)
357
 
358
+ fix_dtype = not cfg.adapter
359
  if not cfg.gptq and (
360
  (cfg.adapter == "lora" and load_in_8bit)
361
  or (cfg.adapter == "qlora" and cfg.load_in_4bit)