def get_module_file(
    class_reference: str,
    model_name_or_path: str,
    code_revision: Optional[str] = None,
    revision: Optional[str] = None,
    **kwargs,
) -> tuple[str, str]:
    """Get module file for the given class_reference.

    Returns class_reference and module file path.
    """
    from transformers.dynamic_module_utils import HF_MODULES_CACHE, get_cached_module_file

    if "--" in class_reference:
        repo_id, class_reference = class_reference.split("--")
    else:
        repo_id = model_name_or_path

    # class reference is of form configuration_phi3.Phi3Config
    module_name = class_reference.split(".")[0]

    # get code revision
    if code_revision is None and model_name_or_path == repo_id:
        code_revision = revision

    # get the module file
    module_file = Path(HF_MODULES_CACHE) / get_cached_module_file(
        repo_id, f"{module_name}.py", revision=code_revision, **kwargs
    )

    return class_reference, str(module_file)
Get module file for the given class_reference.

    Returns class_reference and module file path.
    
olive/common/hf/utils.py