From a74efcecbead40039214f3f2ecd6785258e73033 Mon Sep 17 00:00:00 2001 From: Sunny Liu Date: Tue, 18 Feb 2025 17:13:52 -0500 Subject: [PATCH] skip move to device --- src/axolotl/utils/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/axolotl/utils/models.py b/src/axolotl/utils/models.py index 6d1bb12c3..24e93a4f6 100644 --- a/src/axolotl/utils/models.py +++ b/src/axolotl/utils/models.py @@ -765,6 +765,7 @@ class ModelLoader: if self.cfg.tp_size is not None: self.model_kwargs["tp_plan"] = "auto" del self.model_kwargs["device_map"] + skip_move_to_device = True if ( # pylint: disable=condition-evals-to-constant) (self.cfg.fsdp and self.cfg.fsdp_config.fsdp_cpu_ram_efficient_loading)