def num_labels_from_task(task: str) -> int:
    """Return the number of labels for the GLUE task."""
    if task.startswith("mnli"):
        return 3
    elif task.startswith("stsb"):
        return 1
    else:
        # all other glue tasks have 2 class labels
        return 2