File size: 5,096 Bytes
c02657c
 
 
 
 
 
 
 
 
 
 
 
 
 
fb6c876
c02657c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fb6c876
 
 
 
 
 
c02657c
 
 
 
 
 
 
 
 
 
 
 
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
"""Registry of upstream open datasets used by OPUS-5.5-DATABASE.

Every entry records the upstream repo, the exact files we read, and the license we
verified on the upstream dataset card. Only permissively licensed sources are used.
"""
from dataclasses import dataclass, field


@dataclass(frozen=True)
class Source:
    name: str            # short id used in the `source` column
    repo: str            # Hugging Face dataset repo id
    files: tuple         # files inside the repo that we download
    license: str         # license verified on the upstream card
    stage: str           # pretrain | sft | preference | tools | eval
    domain: str          # general | math | code | instruction-following | multilingual ...
    max_rows: int = 0    # 0 = keep everything that passes filters
    note: str = ""
    extra: dict = field(default_factory=dict)


SOURCES = [
    # ---------------------------------------------------------------- pretraining
    Source("fineweb-edu", "HuggingFaceFW/fineweb-edu",
           ("sample/10BT/000_00000.parquet", "sample/10BT/001_00000.parquet"),
           "odc-by", "pretrain", "web-edu",
           note="Educational web text (FineWeb-Edu, int_score>=3)."),
    Source("fineweb2-tr", "HuggingFaceFW/fineweb-2",
           ("data/tur_Latn/train/000_00000.parquet",),
           "odc-by", "pretrain", "multilingual-tr", max_rows=600_000,
           note="Turkish web text from FineWeb-2 (tur_Latn)."),
    Source("open-web-math", "open-web-math/open-web-math",
           ("data/train-00000-of-00114-5a023365406cb9c4.parquet",
            "data/train-00001-of-00114-e32fc2813a15f61c.parquet"),
           "odc-by", "pretrain", "math-web",
           note="Mathematical web pages with LaTeX preserved."),
    # ---------------------------------------------------------------- SFT
    Source("smol-magpie-ultra", "HuggingFaceTB/smoltalk",
           tuple(f"data/smol-magpie-ultra/train-0000{i}-of-00006.parquet" for i in range(3)),
           "apache-2.0", "sft", "general", max_rows=200_000),
    Source("smol-constraints", "HuggingFaceTB/smoltalk",
           ("data/smol-constraints/train-00000-of-00001.parquet",),
           "apache-2.0", "sft", "instruction-following"),
    Source("smol-rewrite", "HuggingFaceTB/smoltalk",
           ("data/smol-rewrite/train-00000-of-00001.parquet",),
           "apache-2.0", "sft", "rewriting", max_rows=30_000),
    Source("smol-summarize", "HuggingFaceTB/smoltalk",
           ("data/smol-summarize/train-00000-of-00001.parquet",),
           "apache-2.0", "sft", "summarization", max_rows=40_000),
    Source("oasst2", "OpenAssistant/oasst2",
           ("2023-11-05_oasst2_ready.trees.jsonl.gz",),
           "apache-2.0", "sft", "human-written-multilingual",
           note="Human-written conversation trees; we keep the highest-ranked path per tree."),
    Source("metamathqa", "meta-math/MetaMathQA", ("MetaMathQA-395K.json",),
           "mit", "sft", "math", max_rows=100_000),
    Source("openmathinstruct2", "nvidia/OpenMathInstruct-2",
           ("data/train_1M-00000-of-00003.parquet",),
           "cc-by-4.0", "sft", "math", max_rows=100_000),
    Source("gsm8k", "openai/gsm8k", ("main/train-00000-of-00001.parquet",),
           "mit", "sft", "math"),
    Source("magicoder-oss", "ise-uiuc/Magicoder-OSS-Instruct-75K",
           ("data-oss_instruct-decontaminated.jsonl",), "mit", "sft", "code"),
    Source("codealpaca", "sahil2801/CodeAlpaca-20k", ("code_alpaca_20k.json",),
           "cc-by-4.0", "sft", "code"),
    # ---------------------------------------------------------------- preference
    Source("ultrafeedback", "HuggingFaceH4/ultrafeedback_binarized",
           ("data/train_prefs-00000-of-00001.parquet",), "mit", "preference", "general"),
    Source("orca-dpo", "argilla/distilabel-intel-orca-dpo-pairs",
           ("data/train-00000-of-00001.parquet",), "apache-2.0", "preference", "general"),
    # ---------------------------------------------------------------- tool use / function calling
    Source("hermes-fc", "NousResearch/hermes-function-calling-v1",
           ("func-calling.json", "func-calling-singleturn.json"), "apache-2.0", "tools", "function-calling"),
    Source("toolace", "Team-ACE/ToolACE", ("data.json",), "apache-2.0", "tools", "function-calling"),
    Source("glaive-fc-v2", "glaiveai/glaive-function-calling-v2", ("glaive-function-calling-v2.json",),
           "apache-2.0", "tools", "function-calling", max_rows=40_000),
    # ---------------------------------------------------------------- eval / decontamination only
    Source("gsm8k-test", "openai/gsm8k", ("main/test-00000-of-00001.parquet",),
           "mit", "eval", "math"),
    Source("math500", "HuggingFaceH4/MATH-500", ("test.jsonl",), "mit", "eval", "math"),
    Source("humaneval", "openai/openai_humaneval",
           ("openai_humaneval/test-00000-of-00001.parquet",), "mit", "eval", "code"),
    Source("mmlu", "cais/mmlu", ("all/test-00000-of-00001.parquet",), "mit", "eval", "knowledge"),
]


def by_stage(stage):
    return [s for s in SOURCES if s.stage == stage]