Update src/axolotl/utils/models.py

Co-authored-by: Aman Gupta Karmani <aman@tmm1.net>
This commit is contained in:
Maxime
2023-08-27 21:01:37 +02:00
committed by GitHub
parent d03887fad5
commit 9e699683d7

View File

@@ -355,7 +355,7 @@ def load_model(
if hasattr(module, "weight"):
module.to(torch.float32)
fix_dtype = False
fix_dtype = not cfg.adapter
if not cfg.gptq and (
(cfg.adapter == "lora" and load_in_8bit)
or (cfg.adapter == "qlora" and cfg.load_in_4bit)