task_categories:zero-shot-classification task_categories:text-classification task_ids:natural-language-inference multilinguality:multilingual license:other region:us
---
dataset_info:
  features:
  - name: labels
    dtype:
      class_label:
        names:
          '0': entailment
          '1': neutral
          '2': contradiction
  - name: premise
    dtype: string
  - name: hypothesis
    dtype: string
  - name: task
    dtype: string
  splits:
  - name: train
    num_bytes: 185352754.0
    num_examples: 878967
  - name: test
    num_bytes: 1775890.0
    num_examples: 9400
  - name: validation
    num_bytes: 1817480.0
    num_examples: 9400
  download_size: 104413879
  dataset_size: 188946124.0
license: other
task_categories:
- zero-shot-classification
- text-classification
task_ids:
- natural-language-inference
multilinguality:
- multilingual
---

[mtasksource](https://github.com/sileod/tasksource) classification tasks recasted as natural language inference. 
This dataset is intended to improve label understanding in [zero-shot classification HF pipelines](https://huggingface.co/docs/transformers/main/main_classes/pipelines#transformers.ZeroShotClassificationPipeline
).

Inputs that are text pairs are separated by a newline (\n).
```python
from transformers import pipeline
classifier = pipeline(model="sileod/mdeberta-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"],
)
```
[mdeberta-v3-base-tasksource-nli](https://huggingface.co/sileod/mdeberta-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}
}
```