diff --git a/pilot/model/loader.py b/pilot/model/loader.py index 9631d7a0a..c1af72e6e 100644 --- a/pilot/model/loader.py +++ b/pilot/model/loader.py @@ -117,8 +117,8 @@ def huggingface_loader(llm_adapter: BaseLLMAdaper, model_params: ModelParams): max_memory = None # if device is cpu or mps. gpu need to be zero - num_gpus = 0 - + num_gpus = 0 + if device == "cpu": kwargs = {"torch_dtype": torch.float32} elif device == "cuda":