-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely rework dataset/cache system: instant resume, perfect shuff…
…le, stable mixtures and more (#716) Introduces a massive rework of Levanter's cache system to support instant resume, perfect shuffle, stable mixtures and such. The basic idea is to use TensorStore to store all of our data as a kind of janky column store (implemented in JaggedArrayStore) and pytrees of such (implemented in TreeStore). TensorStore provides efficient storage and access to very large arrays. We still support streaming from an in progress cache via a new AsyncDataset class. I've successfully tests this on the pile and, modulo the usual issues with the llama tokenizer on long documents/books, it behaves well. Closes #626 #311 #119 #34
- Loading branch information
Showing
81 changed files
with
6,691 additions
and
4,455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
scratch | ||
cache | ||
new-cache | ||
wandb | ||
checkpoints | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
data: | ||
tokenizer: "meta-llama/Llama-2-7b-hf" | ||
cache_dir: "gs://levanter-data/new-tokenized/pile_mix/" | ||
shuffle: | ||
era_length: 10000 | ||
configs: | ||
arxiv: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/arxiv/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/arxiv/val.jsonl.zst | ||
books2: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/books2/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/books2/val.jsonl.zst | ||
books3: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/books3/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/books3/val.jsonl.zst | ||
dm_math: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/dm_math/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/dm_math/val.jsonl.zst | ||
enron: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/enron/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/enron/val.jsonl.zst | ||
europarl: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/europarl/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/europarl/val.jsonl.zst | ||
free_law: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/freelaw/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/freelaw/val.jsonl.zst | ||
github: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/github/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/github/val.jsonl.zst | ||
hackernews: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/hackernews/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/hackernews/val.jsonl.zst | ||
nih: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/nih/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/nih/val.jsonl.zst | ||
opensubtitles: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/opensubtitles/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/opensubtitles/val.jsonl.zst | ||
owt2: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/owt2/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/owt2/val.jsonl.zst | ||
pg_19: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/pg_19/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/pg_19/val.jsonl.zst | ||
philpapers: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/philpapers/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/philpapers/val.jsonl.zst | ||
pile_cc: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/pile_cc/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/pile_cc/val.jsonl.zst | ||
pubmed_abs: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/pubmed_abs/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/pubmed_abs/val.jsonl.zst | ||
pubmed_central: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/pubmed_central/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/pubmed_central/val.jsonl.zst | ||
stack_exchange: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/stack_exchange/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/stack_exchange/val.jsonl.zst | ||
ubuntu_irc: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/ubuntu_irc/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/ubuntu_irc/val.jsonl.zst | ||
uspto: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/uspto/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/uspto/val.jsonl.zst | ||
wiki_en: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/wiki_en/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/wiki_en/val.jsonl.zst | ||
youtube_subtitles: | ||
train_urls: | ||
- gs://levanter-data/pile-domains/youtube_subtitles/{00..29}.jsonl.zst | ||
validation_urls: | ||
- gs://levanter-data/pile-domains/youtube_subtitles/val.jsonl.zst | ||
train_weights: | ||
# these weights come from the paper https://arxiv.org/pdf/2101.00027.pdf | ||
pile_cc: 0.1811 | ||
pubmed_central: 0.1440 | ||
books3: 0.1207 | ||
owt2: 0.1001 | ||
arxiv: 0.0896 | ||
github: 0.0759 | ||
free_law: 0.0612 | ||
stack_exchange: 0.0513 | ||
uspto: 0.0365 | ||
pubmed_abs: 0.0307 | ||
pg_19: 0.0217 | ||
opensubtitles: 0.0155 | ||
wiki_en: 0.0153 | ||
dm_math: 0.0124 | ||
ubuntu_irc: 0.0088 | ||
books2: 0.0075 | ||
europarl: 0.0073 | ||
hackernews: 0.0062 | ||
youtube_subtitles: 0.0060 | ||
philpapers: 0.0038 | ||
nih: 0.0030 | ||
enron: 0.0014 | ||
model: | ||
type: llama | ||
hidden_dim: 768 | ||
intermediate_dim: 2048 | ||
num_heads: 6 | ||
num_kv_heads: 6 | ||
num_layers: 12 | ||
seq_len: 1024 | ||
gradient_checkpointing: true | ||
trainer: | ||
tracker: | ||
project: "levanter" | ||
tags: [ "pile", "llama", "itest"] | ||
|
||
mp: p=f32,c=bfloat16 | ||
model_axis_size: 1 | ||
|
||
train_batch_size: 256 | ||
num_train_steps: 20000 | ||
optimizer: | ||
learning_rate: 1E-3 | ||
weight_decay: 0.1 | ||
warmup: 0.01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.