File size: 9,710 Bytes
2da4d54
 
 
 
 
 
 
 
 
 
 
 
0bb0cdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2da4d54
 
 
 
0f3b446
 
3f639b3
2da4d54
 
 
 
b537afc
3f639b3
b537afc
 
 
 
 
3f639b3
 
 
 
 
42e2ae2
 
3f639b3
 
 
 
 
 
0bb0cdd
 
 
 
 
 
 
 
 
 
 
 
 
 
2da4d54
 
 
 
 
 
42e2ae2
 
 
 
2da4d54
 
3f639b3
2da4d54
 
3f639b3
2da4d54
42e2ae2
2da4d54
 
 
42e2ae2
 
 
2da4d54
 
42e2ae2
 
2da4d54
 
3f639b3
 
 
 
 
2da4d54
 
 
 
 
 
 
 
 
 
 
 
3f639b3
2da4d54
 
 
3f639b3
 
2da4d54
 
 
 
 
 
 
 
 
 
 
 
3f639b3
2da4d54
3f639b3
2da4d54
3f639b3
2da4d54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
license: cc-by-sa-4.0
language:
  - en
tags:
  - music
  - audio
  - log-mel
  - rvq
  - audio-tokens
  - staleynet
pretty_name: StaleyNET derived training data
configs:
  - config_name: reconstruction
    default: true
    data_files:
      - split: train
        path: ["samples/reconstruction-fine/*.wav", "samples/reconstruction-fine/metadata.jsonl"]
  - config_name: reconstruction-first-tokenizer
    data_files:
      - split: train
        path: ["samples/reconstruction/*.wav", "samples/reconstruction/metadata.jsonl"]
  - config_name: generated
    data_files:
      - split: train
        path: ["samples/*.wav", "samples/studio/*.wav", "samples/metadata.jsonl"]
  - config_name: overfit-test
    data_files:
      - split: train
        path: ["samples/overfit/*.wav", "samples/overfit/metadata.jsonl"]
  - config_name: recordings
    data_files:
      - split: train
        path: ["recordings/*.wav", "recordings/metadata.jsonl"]
---

# StaleyNET derived training data

[![Source on GitHub](https://img.shields.io/badge/source-GitHub-1D1B20?logo=github)](https://github.com/arpanpathak/staleynet) [![staleynet-audio on crates.io](https://img.shields.io/crates/v/staleynet-audio?label=staleynet-audio)](https://crates.io/crates/staleynet-audio) [![Paper](https://img.shields.io/badge/paper-PDF-6750A4)](https://github.com/arpanpathak/staleynet/blob/main/paper/preprint.pdf) [![Book](https://img.shields.io/badge/book-mdBook-6750A4)](https://github.com/arpanpathak/staleynet/tree/main/book/src) [![Release v0.1.2](https://img.shields.io/github/v/release/arpanpathak/staleynet)](https://github.com/arpanpathak/staleynet/releases) [![Checkpoints: 9 runs](https://img.shields.io/badge/checkpoints-9%20runs-FFD21E?logo=huggingface&logoColor=black)](https://huggingface.co/arpanpathak/staleynet-checkpoints)

Derived artifacts for training and evaluating **StaleyNET**, a text-prompted music generator written in Rust. This repository contains the caches the training loop reads, the fitted RVQ tokenizer, generated samples, and the metadata needed to rebuild the caches from the original datasets. It does not contain the raw third-party audio.

Code, paper, and book: <https://github.com/arpanpathak/staleynet>.
Checkpoints: <https://huggingface.co/arpanpathak/staleynet-checkpoints>.

## Release v0.1.2

- GitHub release: <https://github.com/arpanpathak/staleynet/releases/tag/v0.1.2>
- `staleynet-audio` 0.1.2 on crates.io: <https://crates.io/crates/staleynet-audio>. Its page explains each audio step with intuition and runnable examples.
- Since v0.1.1: the GPU kernels are organised into one module per topic, the AGX Thor builds against cuda-oxide's main branch, and the paper has been revised with hardware, benchmark and tokenizer appendices.
- New in these repositories: the `lyrics-thor`, `lyrics-thor-long` and `pq-large` runs, and the band-group token caches they train on.
- CI: rustfmt, clippy with warnings denied, cargo-deny, the audio coverage gate, and documentation tests for every example on the crate page.

## At a glance

| Item | Value |
|---|---|
| Files | 3,189 |
| Size | 3.12 GB |
| Audio features | 128 mel bands at 24 kHz, FFT 1024, hop 256 |
| Audio tokens | 4 residual codebooks, 1024 entries each |
| Tokenizer | residual k-means, about 12 MB |
| Samples | 79 generated, reconstruction, tokenizer, and studio files |
| License | CC BY-SA 4.0, subject to the upstream dataset terms |

## Listening in the dataset viewer

The viewer above plays the project's **audio outputs**, not its training
data. The training data itself is the spectrogram and token caches described
below, binary files that the viewer cannot play. Choose a view from the menu:

| View | What it contains |
|---|---|
| `reconstruction` (default) | Four held-out songs, each in four versions: the original recording, its exact spectrogram through Griffin-Lim, its tokens using only the coarsest level, and its tokens using all 16 codes. This is the clearest way to hear where detail is lost; the `spectral_error_log_units` column gives the measured loss of each version. |
| `reconstruction-first-tokenizer` | The same comparison with the first tokenizer, which loses about twice as much detail. |
| `generated` | Samples generated by the early models on the first tokenizer. They sound blurred and noisy: the reconstruction views show that most of that blur comes from the first tokenizer, which the current one halves. |
| `overfit-test` | A model trained on a single excerpt reproduces it; compare its outputs with the excerpt's own tokens. |
| `recordings` | The author's own takes, with their descriptions and lyrics. All rights reserved. |

## Layout

| Directory | Files | Size | Contents |
|---|---:|---:|---|
| `cache/` | 1,415 | 2.0 GB | SDD log-mel (`.f16`) and RVQ codes (`.u16`), tokenizer, manifest |
| `cache-jamendolyrics/` | 161 | 408 MB | JamendoLyrics log-mel, codes, tokenizer, manifest |
| `cache-g4l4f1/` | 708 | 246 MB | band-group tokenizer (4 groups × 4 levels): SDD codes, tokenizer, manifest |
| `cache-pq-jamendolyrics/` | 82 | 56 MB | JamendoLyrics codes under the band-group tokenizer |
| `cache-pq-recordings/` | 5 | 6.1 MB | codes for the author's own takes under the band-group tokenizer |
| `cache-l16f1/` | 709 | 264 MB | tokenizer-study control: 16 residual levels without band groups |
| `cache-overfit/` | 5 | 12 MB | single-take overfit cache |
| `cache-recordings/` | 3 | 2.2 MB | log-mel for the author's own takes |
| `recordings/` | 8 | 8.0 MB | 2 own takes: WAV, caption, lyrics, JSON |
| `overfit/` | 2 | 572 KB | the single overfit take and caption |
| `samples/` | 79 | 34 MB | generated, reconstruction, tokenizer, and studio samples |
| `raw/` | 7 | 480 KB | SDD and JamendoLyrics metadata and license tables, plus the provenance README |

The caches built on another tokenizer reuse the log-mel features of their source cache, so their `mel/` directories are omitted here to avoid duplicating several gigabytes. Recreate them with:

```bash
ln -s ../cache/mel data/cache-g4l4f1/mel
ln -s ../cache/mel data/cache-l16f1/mel
ln -s ../cache-jamendolyrics/mel data/cache-pq-jamendolyrics/mel
ln -s ../cache-recordings/mel data/cache-pq-recordings/mel
```

The band-group caches feed the `pq-large` run in the checkpoint repository. `cache-l16f1/` is the control of the tokenizer study: its held-out error of 0.427 against 0.401 for `cache-g4l4f1/` shows that most of the improvement over the original tokenizer comes from using more codes per step.

## Formats

- `mel/*.f16`: little-endian `f16` log-mel, 128 bands, 24 kHz, FFT 1024, hop 256, 0 to 12 kHz, normalized with the per-band statistics in `manifest.json`.
- `codes/*.u16`: little-endian `u16` RVQ indices, 4 codebooks of 1024 entries, 1 token per codebook per audio step.
- `tokenizer.json`: the fitted residual k-means codebooks, about 12 MB.
- `manifest.json`: track list, mel parameters, normalization statistics, and per-track token counts.
- `samples/*.json`: the prompt, checkpoint, timing, and real-time factor next to each generated WAV.

## Download and use

```bash
hf download arpanpathak/staleynet-data \
  --repo-type dataset --local-dir data

# The caches now sit where the CLI expects them.
staleynet sing  --cache data/cache --run ... --prompt "..." --out song.wav
staleynet train --cache data/cache --run runs/base --config configs/base.json
```

For the lyrics model, add `data/cache-jamendolyrics` through `extra_sources` in the run configuration, as `configs/lyrics-orin.json` does.

## Provenance

- **Song Describer Dataset (SDD)**, <https://zenodo.org/records/10072001>. The dataset has 706 Jamendo recordings with human captions. Captions are CC BY-SA 4.0. Each recording carries the Creative Commons license listed in `raw/song-describer/audio_licenses.txt`, including CC BY-NC-ND and CC BY-NC-SA. Raw audio is not redistributed here.
- **JamendoLyrics MultiLang**, <https://github.com/f90/jamendolyrics>. Code and metadata are MIT. Songs and lyrics carry the per-song CC license in `raw/jamendolyrics/JamendoLyrics.csv`. The upstream repository notes that the dataset has moved to <https://huggingface.co/datasets/jamendolyrics/jamendolyrics>. Raw audio is not redistributed here.

To rebuild the caches, follow the commands in the code README:

```bash
staleynet prepare  --song-describer data/raw/song-describer --cache data/cache
staleynet tokenize --cache data/cache
staleynet prepare  --jamendo-lyrics data/raw/jamendolyrics --cache data/cache-jamendolyrics
staleynet tokenize --cache data/cache-jamendolyrics --reuse data/cache/tokenizer.json
```

## Licensing

The derived caches, tokenizer, and generated samples are offered under CC BY-SA 4.0 (`LICENSE-CC-BY-SA-4.0.txt`) only to the extent the upstream dataset licenses permit it. The source recordings include NonCommercial and NoDerivatives tracks, so do not use these artifacts commercially where the upstream license forbids it.

**Carve-out:** `recordings/`, `overfit/take.wav`, and `cache-recordings/` are the author's own vocal recordings. They are included for reproducibility and are not licensed for reuse. All rights are reserved. Do not redistribute them or train a voice model on them without permission.

`raw/` contains only metadata tables copied from the upstream datasets. Their own licenses apply.

## Integrity

`SHA256SUMS` lists every file in this repository. Verify with:

```bash
sha256sum -c SHA256SUMS
```

## Citation

```bibtex
@misc{pathak2026staleynet,
  author = {Arpan Pathak},
  title  = {StaleyNET: Text-Conditioned Music Generation Trained from Scratch
            on Edge GPUs in Rust},
  year   = {2026},
  url    = {https://github.com/arpanpathak/staleynet}
}
```