def get_load_kwargs(self, exclude_load_keys: Optional[list[str]] = None) -> dict[str, Any]:
        """Return all args in a dict with types expected by `from_pretrained`."""
        loading_args = {}
        # copy args that can be directly copied
        direct_copy_args = ("device_map", "max_memory")
        for arg in direct_copy_args:
            if getattr(self, arg):
                loading_args[arg] = deepcopy(getattr(self, arg))
        # convert torch dtype to torch.dtype or "auto"
        if self.torch_dtype:
            loading_args["torch_dtype"] = self.get_torch_dtype()
        # convert quantization_config to the config class
        quantization_config = self.get_quantization_config()
        if quantization_config:
            loading_args["quantization_config"] = quantization_config
        if self.trust_remote_code:
            loading_args["trust_remote_code"] = self.trust_remote_code
        # add extra args
        if self.extra_args:
            loading_args.update(deepcopy(self.extra_args))
        # exclude keys
        if exclude_load_keys:
            loading_args = exclude_keys(loading_args, exclude_load_keys)

        return loading_args
Return all args in a dict with types expected by `from_pretrained`.
olive/model/config/hf_config.py