def _load_from_private_hugging_face_repo(self) -> Tuple:
        """Load the model from the private Hugging Face model hub based on the model_location."""

        hf_repo_token = None
        if self.model_auth is not None and self.model_auth.hf is not None:
            hf_repo_token = self.model_auth.hf.token

        try:
            model = AutoModel.from_pretrained(
                self.model_properties.model_location.hf.repo_id,
                token=hf_repo_token,
                **self._model_flags.dict(exclude_none=True)
            )
            tokenizer = AutoTokenizer.from_pretrained(
                self.model_properties.model_location.hf.repo_id,
                token=hf_repo_token,
                **self._tokenizer_flags.dict(exclude_none=True)
            )
        except (OSError, ValueError, RuntimeError) as e:
            raise InvalidModelPropertiesError(
                f"Marqo encountered an error loading the private Hugging Face model, modelProperties={self.model_properties}. "
                f"Please ensure that the model is a valid Hugging Face model and retry.\n"
                f" Original error message = {e}") from e
        return model, tokenizer
Load the model from the private Hugging Face model hub based on the model_location.
src/marqo/inference/native_inference/embedding_models/hugging_face_model.py