Update src/axolotl/utils/models.py
Browse filesCo-authored-by: Aman Gupta Karmani <[email protected]>
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 =
|
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)
|