File size: 4,714 Bytes
6a16c22 4ada3c2 4372287 4ada3c2 4372287 4ada3c2 6a16c22 02c1d2e 6a16c22 96a46a1 02c1d2e 6a16c22 96a46a1 3057fa8 02c1d2e 96a46a1 3057fa8 96a46a1 6a16c22 4ada3c2 224a5dc 4ada3c2 224a5dc a39e6b7 4ada3c2 224a5dc 4ada3c2 a39e6b7 4ada3c2 437038b 4ada3c2 c5a29ba 4ada3c2 c5a29ba 4ada3c2 437038b 4ada3c2 127ebb0 4ada3c2 a39e6b7 4ada3c2 1dee7ed a39e6b7 4ada3c2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | ---
pretty_name: tasksource-instruct
language:
- en
license: other
size_categories:
- 1M<n<10M
task_categories:
- text-generation
- text-classification
- token-classification
- zero-shot-classification
tags:
- instructions
- instruction-tuning
- instruction-finetuning
- flan
- promptsource
- tasksource
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: test
path: data/test-*
- split: validation
path: data/validation-*
dataset_info:
features:
- name: inputs
dtype: string
- name: targets
dtype: string
- name: task
dtype: string
- name: license
dtype: string
- name: license_use
dtype: string
splits:
- name: train
num_bytes: 6509818491
num_examples: 7282255
- name: validation
num_bytes: 183888515
num_examples: 184914
- name: test
num_bytes: 184116352
num_examples: 192830
download_size: 3122792007
dataset_size: 6877823358
---
# tasksource-instruct
**Instruction-tuning data recast from the ~480 English classification, multiple-choice
and token-classification tasks of [tasksource](https://github.com/sileod/tasksource).**
Every example comes from a human-built dataset (NLI, logical reasoning, sentiment,
hate speech, discourse, argumentation, ...), not from a teacher model. Each task is
capped at 30k training examples, so no task dominates. Many tasks aren't in FLAN v2,
for example DynaSent, DynaHate, discriminative bAbI, epistemic logic, RuleTaker,
veridicality and dozens of NLI datasets.
```python
from datasets import load_dataset
ds = load_dataset("tasksource/tasksource-instruct", split="train")
ds = ds.filter(lambda use: use == "commercial", input_columns="license_use") # optional
```
## Format
| column | content |
|---|---|
| `inputs` | the instruction, the example, and the answer options |
| `targets` | the answer: an option (`entailment.`), a letter (`B.`), or `word: TAG` lines for token tasks |
| `task` | the tasksource task id |
| `license`, `license_use` | the source's licenses, see below |
Prompts ask for the answer with no explanation, so the short targets don't teach a
model to stop explaining in general. Tasks are interleaved round-robin, so any
slice of the split mixes them. Validation and test keep up to 500 examples per task.
`tasksource-instruct` works well mixed with FLAN v2 or other instruction data. It
covers discriminative reasoning tasks that those sets cover less.
For preference pairs built from the same rows, see
[tasksource_dpo_pairs](https://huggingface.co/datasets/tasksource/tasksource_dpo_pairs).
For soft labels, ratings and multi-question requests, see
[tasksource-jev-typed-decisions](https://huggingface.co/datasets/tasksource/tasksource-jev-typed-decisions).
## Reproducibility
The dataset is built by
[`scripts/build_instruct_dataset.py`](https://github.com/sileod/tasksource/blob/main/scripts/build_instruct_dataset.py):
```bash
PYTHONPATH=.:src python scripts/build_instruct_dataset.py --finalize
```
Sources are loaded at pinned Hub revisions. [sources.yaml](sources.yaml) records, per
task, the Hub dataset, revision, original dataset, licenses and row counts, and
`build-report.jsonl` records the code commit of each task's build. MMLU, BIG-bench and
BLiMP are left out, so they stay clean for evaluation. Other public benchmarks (GLUE,
SuperGLUE, HellaSwag, PIQA, ...) are **in** the data through their training splits.
## License and scope
Tasksource harmonizes datasets from many publishers; their original licenses
and terms still apply, hence `license: other`.
- `license` lists the `license` of the Hub dataset card the task was loaded from,
and of the original dataset behind a tasksource copy. It also lists licenses recorded
by the [Data Provenance Initiative](https://www.dataprovenance.org/), marked `(DPI)`.
- `license_use` takes the most restrictive of those: `non-commercial` if any is
non-commercial or academic-only, `commercial` if one allows commercial use (share-alike
and copyleft included), and `unspecified` otherwise.
This is a best-effort aid, not legal advice. Check the original terms before relying on them.
## Citation
```bibtex
@inproceedings{sileo-2024-tasksource,
title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework",
author = "Sileo, Damien",
booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)",
month = may,
year = "2024",
address = "Torino, Italia",
publisher = "ELRA and ICCL",
url = "https://aclanthology.org/2024.lrec-main.1361/",
pages = "15655--15684",
}
```
|