From 98bf76e236ee7450cdfde506d9f409e5e28cb2a2 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Mon, 28 Aug 2023 04:33:50 -0400 Subject: [PATCH] fsdp requires params be the same type too (#493) --- src/axolotl/utils/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/axolotl/utils/models.py b/src/axolotl/utils/models.py index 6cd1cd7ea..063e43977 100644 --- a/src/axolotl/utils/models.py +++ b/src/axolotl/utils/models.py @@ -356,7 +356,7 @@ def load_model( if hasattr(module, "weight"): module.to(torch.float32) - needs_fa2_dtype = cfg.adapter is not None + needs_fa2_dtype = cfg.adapter or cfg.fsdp if not cfg.gptq and ( (cfg.adapter == "lora" and load_in_8bit) or (cfg.adapter == "qlora" and cfg.load_in_4bit)