-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "blocked"/"flash" cross entropy (#790)
to mitigate large tokenizers limiting blocksize (e.g. llama3) imposes a kind of not ideal refactor on LMModel, but it's not the worst. FYI @Helw150 --------- Co-authored-by: Ivan Zhou <[email protected]> Co-authored-by: Abhinav Garg <[email protected]>
- Loading branch information
1 parent
1c43256
commit a7e42ec
Showing
16 changed files
with
880 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
data: | ||
train_urls: | ||
- "gs://pubmed-mosaic/openwebtext-sharded/openwebtext_train.{1..128}-of-128.jsonl.gz" | ||
validation_urls: | ||
- "gs://pubmed-mosaic/openwebtext-sharded/openwebtext_val.{1..8}-of-8.jsonl.gz" | ||
cache_dir: "gs://levanter-data/tokenized/openwebtext_llama3/" | ||
tokenizer: "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF" | ||
model: | ||
type: llama | ||
hidden_dim: 768 | ||
intermediate_dim: 2048 | ||
num_heads: 12 | ||
num_kv_heads: 12 | ||
num_layers: 12 | ||
seq_len: 1024 | ||
gradient_checkpointing: true | ||
trainer: | ||
tracker: | ||
- type: wandb | ||
project: "levanter" | ||
tags: [ "openwebtext", "llama", "itest"] | ||
|
||
mp: p=f32,c=bfloat16 | ||
model_axis_size: 1 | ||
per_device_parallelism: -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
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
Oops, something went wrong.