def load_base_pytorch_model(
        self, model_handler: HfModelHandler, config: type[BasePassConfig], **kwargs
    ) -> "PreTrainedModel":
        """Load a base PyTorch model for fine-tuning.

        :param model_handler: The input model handler.
        :param config: The config for the pass run.
        :param kwargs: Additional arguments to update load_kwargs with.
        :return: The new loaded pytorch model
        """
        import torch

        torch_dtype = self.get_torch_dtype(config.torch_dtype)
        # will use mixed precision since full fp16 is unstable
        model_dtype = torch_dtype if torch_dtype != torch.float16 else torch.float32

        # TODO(jambayk): Worry about `use_multi_gpu` and distributed training later
        # "auto": uses all available GPUs, model parallel
        device_map = config.device_map
        if device_map == DeviceMap.CURRENT_DEVICE:
            device_map = {"": torch.cuda.current_device()}
        return load_hf_base_model(model_handler, torch_dtype=model_dtype, device_map=device_map, **kwargs)
Load a base PyTorch model for fine-tuning.

        :param model_handler: The input model handler.
        :param config: The config for the pass run.
        :param kwargs: Additional arguments to update load_kwargs with.
        :return: The new loaded pytorch model
        
olive/passes/pytorch/lora.py