zero-shot-label-nli / README.md
sileod's picture
Upload README.md with huggingface_hub
774cb9f
|
raw
history blame
1.79 kB
metadata
license: apache-2.0
task_categories:
  - zero-shot-classification
  - text-classification
task_ids:
  - natural-language-inference
language:
  - en
dataset_info:
  features:
    - name: labels
      dtype: int64
    - name: premise
      dtype: string
    - name: hypothesis
      dtype: string
    - name: task
      dtype: string
  splits:
    - name: train
      num_bytes: 551422306
      num_examples: 1090333
    - name: validation
      num_bytes: 10824484
      num_examples: 14419
    - name: test
      num_bytes: 9739005
      num_examples: 14680
  download_size: 302500802
  dataset_size: 571985795

tasksource classification tasks recasted as natural language inference. This dataset is intended to improve label understanding in zero-shot classification HF pipelines.

Inputs that are text pairs are separated by a newline (\n).

from transformers import pipeline
classifier = pipeline(model="sileod/deberta-v3-base-tasksource-nli")
classifier(
    "I have a problem with my iphone that needs to be resolved asap!!",
    candidate_labels=["urgent", "not urgent", "phone", "tablet", "computer"],
)

deberta-v3-base-tasksource-nli will include label-nli in its training mix (a relatively small portion, to keep the model general, but note that nli models work for label-like zero shot classification without specific supervision (https://aclanthology.org/D19-1404.pdf).

@article{sileo2023tasksource,
  title={tasksource: A Dataset Harmonization Framework for Streamlined NLP Multi-Task Learning and Evaluation},
  author={Sileo, Damien},
  year={2023}
}