File size: 5,687 Bytes
7437abd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

pretty_name: SuperCollider corpus and SFT set
license: other
license_name: mixed-see-provenance
license_link: https://huggingface.co/datasets/vecnode/supercollider-moe-dataset/blob/main/PROVENANCE.md
language:
  - en
tags:
  - supercollider
  - audio-programming
  - computer-music
  - code
  - sft
  - pretraining
task_categories:
  - text-generation
size_categories:
  - 10K<n<100K
configs:
  - config_name: sft
    data_files: data/sft/train.jsonl
    default: true
---

# SuperCollider corpus and SFT set

**Training data for [SC-MiniMind-3-MoE](https://github.com/vecnode/sc-minimind-3-moe) — a 198M mixture-of-experts

model that writes SuperCollider and is graded by the language's own compiler.**

![The dataset](diagrams/dataset.png)

Six sources in, two sets out. Every fenced code answer here was parsed by `sclang` before it was allowed in,
and every name a code answer reads was checked to be bound before it is read. That is the whole idea: a
dataset for a language model should be gated by the language.

| | |
|---|---|
| **corpus** | 60,414 chunks · **25.8M tokens** · packed at 512, document- and chunk-disjoint validation |
| **SFT set** | **10,843 rows** (10,614 train / 229 val) · 13,691-pair pool · 761 pairs dropped for a code answer `sclang` rejects |
| **final-pass sets** | the gate sets the last training pass reads — small, and the part that decides behaviour |
| **tokenizer** | the 6,400-token BPE the ids came from, the recipe, and a sha256 over the id stream — [`tokenizer/`](tokenizer) |
| **revision** | data `v0.1.23` · release `v1.0.1` · every file in `checksums.sha256` |
| **licence** | mixed, and partly not ours to relicense — read [PROVENANCE.md](PROVENANCE.md) before using |

## What is in the repository

```

data/

  pretrain/     train.jsonl · val.jsonl            512-token chunks of the cleaned corpus

  sft/          train.jsonl · val.jsonl            the supervised mix (conversations)

                pool.jsonl                         the 13,691-pair pool the mix is sampled from

                coverage.jsonl                     1,305 compiler-verified patches (family COV)

                teacher*.jsonl                     hand-written explanation pairs

                repair-v2.jsonl · repair-twins.jsonl  the repair family and its valid-code twins

  final-pass/   gate10-hx5.jsonl                   verified patches + a random slice of the real mix

                gate13-repair-twins.jsonl          + the repair family paired with its twins

                gate16-identity.jsonl              + two-part identity pairs

diagrams/       the three figures in this card

tokenizer/      the 6,400-token BPE · RECIPE.md · stats.json · tokenize.py

SCHEMA.md       the row schema, exactly

PROVENANCE.md   sources, licences, and what may not be republished

REVISIONS.md    every tag and what changed in it

```

Everything is JSON Lines. The SFT rows are `{"conversations": [{"role": …, "content": …}, …]}` and nothing
else — a dataset for a chat template should not carry columns the trainer has to strip. [SCHEMA.md](SCHEMA.md)
is the contract.

## How it is built

![The pipeline](diagrams/pipeline.png)

`fetch → extract → clean → pack → sft → mix-sft → verify → manifest`, then the model trains on it and every
block it writes is compiled again. The pipeline is [in the repository](https://github.com/vecnode/sc-minimind-3-moe);
[REVISIONS.md](REVISIONS.md) says which rule built which tag, and every run's `config.json` records the sha256
of the set it read.

## Using it

```python

from datasets import load_dataset



sft = load_dataset("json", data_files="data/sft/train.jsonl", split="train")

print(sft[0]["conversations"])

```

## Tokenize it the same way

The corpus is JSONL because text outlives a tokenizer. The *ids* do not, so the tokenizer that produced them
ships here: [`tokenizer/`](tokenizer) carries the exact `tokenizer.json` and `tokenizer_config.json` the
released weights shipped (MiniMind's **6,400-token** byte-level BPE, `tokenizer.json` sha256 `8bf5868a…`),
the recipe in code, and the measured token counts.

```bash

python tokenizer/tokenize.py --verify      # re-derive the pretraining ids, compare the sha256

```

That is the check a pre-tokenized copy of the corpus would have given you, without a second copy to version,
checksum and take down. The pretraining set is **25,775,869 tokens** across `data/pretrain/` (59,179 + 1,235
rows), and the sha256 of the id stream itself is in [`tokenizer/stats.json`](tokenizer/stats.json) — so
"25.8M tokens" is a number you can reproduce rather than one you have to believe.

The SFT rows are the one thing not verifiable this way: the loader prepends a system prompt to 20% of them
at random, so a run's ids are a draw, not an artifact. [`tokenizer/RECIPE.md`](tokenizer/RECIPE.md) says
exactly that, publishes the fixed part (the chat template's rendering), and records what it measured —
including that 4 of the 10,614 rows tokenize to 513–516 tokens and are cut by the 512 window.

## What it is not

- **Not a general SuperCollider reference.** The corpus is what six sources contained on the day it was
  fetched, including their mistakes.
- **Not licence-clean for every source.** sccode.org grants no licence; see [PROVENANCE.md](PROVENANCE.md).
  This repository is public because the record should be auditable, not because every byte is ours to
  redistribute.
- **Not a benchmark.** The acceptance suite lives in the code repository (`suites/`), held out from this data
  on purpose.