ShellElastic-data / README.md
Can111's picture
Update tags
6d8b650 verified
|
Raw History Blame Contribute Delete
10.3 kB
---
license: cc-by-4.0
language:
- en
pretty_name: ShellElastic data
size_categories:
- 10M<n<100M
task_categories:
- text-generation
tags:
- elastic-models
- foundation-models
- hyperparameter-transfer
- maximal-update-parameterization
- pretraining
viewer: false
---
<div align="center">
<div align="center" class="dark:hidden"><img alt="ShellElastic" src="https://huggingface.co/spaces/Can111/ShellElastic/resolve/main/shellelastic-logo-light.svg" height="42"></div>
<div align="center" class="hidden dark:block"><img alt="ShellElastic" src="https://huggingface.co/spaces/Can111/ShellElastic/resolve/main/shellelastic-logo-dark.svg" height="42"></div>
<h3 align="center">Scalable Elastic Pretraining<br>with Simultaneous Maximal Updates and Hyperparameter Transfer</h3>
<p align="center"><small><b>Can&nbsp;Jin</b><sup>1*</sup> · <b>Yan&nbsp;Kang</b><sup>2</sup> · <b>Yifan&nbsp;Gong</b><sup>2</sup> · <b>Chongjian&nbsp;Ge</b><sup>2</sup> · <b>Mingze&nbsp;Xu</b><sup>2</sup> · <b>Yuanjun&nbsp;Xiong</b><sup>2</sup> · <b>Dimitris&nbsp;N.&nbsp;Metaxas</b><sup>1</sup> · <b>Hongwu&nbsp;Peng</b><sup>2</sup></small></p>
<p align="center"><small><sup>1</sup>Rutgers University &emsp; <sup>2</sup>Adobe Research</small></p>
<p align="center"><small><sup>*</sup>Corresponding author: <a href="mailto:can.jin@rutgers.edu">can.jin@rutgers.edu</a>. Work done during an internship at Adobe Research.</small></p>
<p align="center">
<a href="https://arxiv.org/pdf/2610.15124"><img alt="Paper" src="https://img.shields.io/badge/Paper-PDF-b31b1b?style=for-the-badge"></a>
<a href="https://jincan333.github.io/ShellElastic_page"><img alt="Project Page" src="https://img.shields.io/badge/Project-Page-2f6db5?style=for-the-badge"></a>
<a href="https://github.com/jincan333/ShellElastic"><img alt="Code" src="https://img.shields.io/badge/Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white"></a>
<a href="https://huggingface.co/spaces/Can111/ShellElastic"><img alt="Checkpoints" src="https://img.shields.io/badge/Checkpoints-Hugging%20Face-ffd21e?style=for-the-badge&logo=huggingface&logoColor=white"></a>
<a href="https://huggingface.co/spaces/Can111/ShellElastic"><img alt="Datasets" src="https://img.shields.io/badge/Datasets-Hugging%20Face-ffd21e?style=for-the-badge&logo=huggingface&logoColor=white"></a>
</p>
</div>
## About ShellElastic
Foundation models need to support diverse inference budgets. Elastic models train several nested sub-networks inside one weight-shared supernet. ShellElastic is an elastic transformer that organizes hidden dimensions into a dense core and successive shells, so that every hidden matrix is block lower triangular. One full-width forward pass contains the exact hidden states of every sub-network, so joint training keeps a fixed computation graph and costs about as much per step as training the widest sub-network alone.
µ-Elastic extends maximal update parameterization (µP) to ShellElastic and other elastic architectures. Its scaling rules keep all sub-networks of a supernet maximally updated simultaneously, and hyperparameters tuned on a small non-elastic proxy stay near-optimal for elastic families and larger supernets. A single ShellElastic run produces sub-networks that outperform MatFormer and fully elastic baselines at matched parameter counts, and approach separately trained models that together take several times the steps.
## Tokenized training and validation data
The tokenized training and validation data of the runs of the paper. As described in Section 4.1 of the paper,
training uses [DCLM-Baseline](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) (Li et al., 2024) and validation held-out [C4](https://huggingface.co/datasets/allenai/c4) text (Raffel et al.,
2020), tokenized with the [GPT-NeoX-20B tokenizer](https://huggingface.co/EleutherAI/gpt-neox-20b) (Black et al., 2022) and packed into sequences of 2,049
tokens. This repository holds exactly the shards that the runs read, in the layout that the code of the paper reads.
The final checkpoints of these runs are listed on the [ShellElastic page](https://huggingface.co/spaces/Can111/ShellElastic).
## Contents
| Path | Contents | Size | Sequences | Used for |
|---|---|---|---|---|
| `dclm-baseline/` | 3,136 shards (`*.tar`) and `manifest.jsonl` | 141.32 GB | 25,690,112 | training |
| `c4-val/` | 11 shards (`shard-*.tar`) | 1.12 GB | 84,999 | validation |
| `shards.tsv` | the training shards in the order the runs read them, with the sequences read from each at every scale | | | |
## Format
Every shard is a tar file in WebDataset format, with one sequence of 2,049 token ids per sample:
- `dclm-baseline/`: 8,192 samples per shard, each a gzip-compressed JSON list of token ids (`<key>.json.gz`);
- `c4-val/`: each sample a Python list literal (`<key>.txt`) of token ids, in which the end of a document is written
as the string `'<|endoftext|>'`; the code reads it as token id 0, the `<|endoftext|>` token of the tokenizer.
Token ids index the 50,432-entry vocabulary of the GPT-NeoX-20B tokenizer (Table 7 of the paper). A training example
takes the first 2,048 tokens of a sample as its inputs and the last 2,048 as its next-token targets.
`dclm-baseline/manifest.jsonl` has one line `{"shard": ..., "num_sequences": ...}` for each of the 22,981 shards
of the tokenized DCLM-Baseline subset that these shards come from. Only the 3,136 shards that the paper's runs read
are included; the manifest is kept whole because the order in which the code reads the shards is a seeded shuffle of
all of its entries.
## Usage
The configs of the code repository read the training data from `data/dclm-baseline` and the validation data from
`data/c4-val`. From the root of the code repository:
```python
from huggingface_hub import snapshot_download
snapshot_download("Can111/ShellElastic-data", repo_type="dataset", local_dir="data")
```
To download only the shards that the runs of one scale read (here 119M–285M; the columns `read_375M-906M` and
`read_675M-1.69B` of `shards.tsv` select the other two scales):
```python
import csv
from huggingface_hub import hf_hub_download, snapshot_download
repo = "Can111/ShellElastic-data"
with open(hf_hub_download(repo, "shards.tsv", repo_type="dataset")) as f:
shards = [r["shard"] for r in csv.DictReader(f, delimiter="\t") if int(r["read_119M-285M"]) > 0]
snapshot_download(repo, repo_type="dataset", local_dir="data",
allow_patterns=[f"dclm-baseline/{s}.tar" for s in shards]
+ ["dclm-baseline/manifest.jsonl", "c4-val/*"])
```
## Which shards the runs read
With the settings of the paper (8 GPUs with 8 data-loader workers each, data seed 1), the code shuffles the entries
of `manifest.jsonl` with the seed and splits the shards of that order among the GPUs and workers. All runs at a scale
read the same data in the same order, and the three scales read the first shards of the same order:
| Scale | Steps × batch | Shards read | Sequences read | Training tokens | Size of the shards |
|---|---|---|---|---|---|
| 119M–285M | 25,000 × 128 | the first 448 | 3,200,000 | 6.55B | 20.19 GB |
| 375M–906M | 50,000 × 256 | the first 1,600 | 12,800,000 | 26.2B | 72.10 GB |
| 675M–1.69B | 100,000 × 256 | all 3,136 | 25,600,000 | 52.4B | 141.32 GB |
The runs read the last 64 shards of each scale only in part; `shards.tsv` gives the number of sequences read from
every shard. With other numbers of GPUs or workers the shards are split differently, and the longest runs can then
need shards that are not included here.
## Limitations
The data are filtered web text. They can contain incorrect, biased or offensive content, and are meant for research
on language model pretraining.
## License
This dataset is released under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). It is derived from third-party data, whose terms also apply:
- `dclm-baseline/`: a subset of [DCLM-Baseline](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) (Li et al., 2024), which is distributed under CC-BY-4.0 and
derived from Common Crawl. Changes: the text was tokenized with the GPT-NeoX-20B tokenizer, packed into sequences of
2,049 tokens and shuffled into shards of 8,192 sequences, and only the shards that the paper's runs read are
included.
- `c4-val/`: held-out text of [C4](https://huggingface.co/datasets/allenai/c4) (Raffel et al., 2020), which is distributed under [ODC-BY](https://opendatacommons.org/licenses/by/1-0/)
together with the [Common Crawl terms of use](https://commoncrawl.org/terms-of-use/), tokenized and packed in the same way. Its use is also
subject to the attribution requirements of ODC-BY and to the Common Crawl terms of use.
- The token ids refer to the [GPT-NeoX-20B tokenizer](https://huggingface.co/EleutherAI/gpt-neox-20b) (Apache-2.0), which is not bundled here.
The underlying web text belongs to its authors. DCLM-Baseline is intended for research use (see its dataset card).
## Citation
```bibtex
@article{jin2026shellelastic,
title = {{ShellElastic}: Scalable Elastic Pretraining with Simultaneous Maximal Updates and Hyperparameter Transfer},
author = {Jin, Can and Kang, Yan and Gong, Yifan and Ge, Chongjian and Xu, Mingze and Xiong, Yuanjun and Metaxas, Dimitris N. and Peng, Hongwu},
journal = {arXiv preprint arXiv:2610.15124},
year = {2026},
url = {https://arxiv.org/abs/2610.15124}
}
@article{li2024datacomp,
title={Datacomp-lm: In search of the next generation of training sets for language models},
author={Li, Jeffrey and Fang, Alex and Smyrnis, Georgios and Ivgi, Maor and Jordan, Matt and Gadre, Samir and Bansal, Hritik and Guha, Etash and Keh, Sedrick and Arora, Kushal and others},
journal={Advances in Neural Information Processing Systems},
volume={37},
pages={14200--14282},
year={2024}
}
@article{raffel2020exploring,
title={Exploring the limits of transfer learning with a unified text-to-text transformer},
author={Raffel, Colin and Shazeer, Noam and Roberts, Adam and Lee, Katherine and Narang, Sharan and Matena, Michael and Zhou, Yanqi and Li, Wei and Liu, Peter J},
journal={Journal of machine learning research},
volume={21},
number={140},
pages={1--67},
year={2020}
}
```