def get_context_bin_file_names(model_path: Union[str, Path]) -> list[str]:
    """Get the context binary file names from the model.

    :param model_path: Path to the model file.
    :return: List of context binary file names.
    """
    file_names = set()
    for node in onnx.load(model_path, load_external_data=False).graph.node:
        if node.op_type == "EPContext":
            for attr in node.attribute:
                if attr.name == "ep_cache_context":
                    try:
                        file_names.add(attr.s.decode("utf-8"))
                    except UnicodeDecodeError:
                        # embedded context binary file
                        continue
    return list(file_names)
Get the context binary file names from the model.

    :param model_path: Path to the model file.
    :return: List of context binary file names.
    
olive/passes/onnx/common.py