def METHOD_NAME(
    cls,
    model,
    directory: str,
    base_model_reference: Optional[HuggingFaceModelReference] = None,
) -> "HuggingFaceStoredModel":
    """Store the model in remote storage.
    Parameters
    ----------
    model:
        The model as a Hugging Face transformer model.
    directory:
        The directory to store the model in.
    base_model_reference:
        This parameter only applies to Peft models. If this parameter
        is supplied, instead of storing the base model at the specified
        location, the base model will not be stored. At model load time,
        the base model will be re-pulled from Hugging Face Hub using the
        supplied reference.
    Returns
    -------
    A reference to the stored model.
    """
    directory = os.path.expanduser(directory)
    model_type: str = _type_to_str(type(model))
    peft_type: Optional[str] = None
    if hasattr(model, "get_base_model"):
        if base_model_reference is None:
            model.get_base_model().save_pretrained(
                os.path.join(directory, _BASE_MODEL_SUFFIX)
            )
        model.save_pretrained(os.path.join(directory, _PEFT_MODEL_SUFFIX))
        model_type = _type_to_str(type(model.get_base_model()))
        peft_type = _type_to_str(type(model))
    else:
        model.save_pretrained(os.path.join(directory, _FULL_MODEL_SUFFIX))
    return HuggingFaceStoredModel(
        path=os.path.abspath(directory),
        model_type=model_type,
        peft_model_type=peft_type,
        base_model_reference=base_model_reference,
    )