forked from allenai/OLMo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add some default configs * clean up * shh, mypy * add gantry example to README * skip GPU tests when no beaker token * revert * update * ensure lm head tied to wte * rename * force wider terminal
- Loading branch information
Showing
8 changed files
with
218 additions
and
18 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
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,86 @@ | ||
run_name: 1.2b-c4-run-001 | ||
seed: 6198 | ||
dry_run: false | ||
|
||
model: | ||
d_model: 2048 | ||
n_heads: 16 | ||
n_layers: 24 | ||
mlp_ratio: 4 | ||
alibi: true | ||
alibi_bias_max: 8.0 | ||
attention_dropout: 0.1 | ||
attention_layer_norm: true | ||
residual_dropout: 0.1 | ||
embedding_dropout: 0.1 | ||
max_sequence_length: 1024 | ||
vocab_size: 50257 | ||
eos_token_id: 50256 | ||
pad_token_id: 50256 | ||
init_device: meta | ||
init_std: 0.02 | ||
|
||
optimizer: | ||
learning_rate: 2.0e-4 | ||
weight_decay: 0.01 | ||
betas: | ||
- 0.9 | ||
- 0.95 | ||
eps: 1.0e-08 | ||
|
||
scheduler: | ||
name: cosine_with_warmup | ||
t_warmup: 100ba | ||
alpha_f: 0.1 | ||
|
||
algorithms: | ||
gradient_clipping: | ||
clipping_type: norm | ||
clipping_threshold: 1.0 | ||
|
||
data: | ||
paths: | ||
- /net/nfs.cirrascale/allennlp/llm-data/c4/en/c4-train.*.npy | ||
pad_direction: right | ||
num_workers: 2 | ||
drop_last: true | ||
pin_memory: true | ||
prefetch_factor: 2 | ||
persistent_workers: true | ||
timeout: 0 | ||
|
||
tokenizer: | ||
identifier: gpt2 | ||
truncate_direction: right | ||
|
||
max_duration: 24800ba # ~ 26B tokens | ||
|
||
save_folder: /results | ||
save_interval: 1000ba | ||
save_num_checkpoints_to_keep: 2 | ||
save_overwrite: false | ||
|
||
load_path: null | ||
load_weights_only: false | ||
|
||
global_train_batch_size: 512 | ||
device_train_batch_size: auto | ||
device_train_microbatch_size: auto | ||
device_train_grad_accum: auto | ||
device_eval_batch_size: null | ||
|
||
n_gpus: null | ||
|
||
precision: null | ||
|
||
fsdp_config: | ||
sharding_strategy: FULL_SHARD | ||
mixed_precision: DEFAULT | ||
activation_checkpointing: false | ||
activation_cpu_offload: false | ||
verbose: false | ||
|
||
wandb: | ||
project: petew-benchmarks | ||
entity: ai2-llm | ||
name: ${run_name} |
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,29 @@ | ||
""" | ||
Run this to initialize a new training config to a file. | ||
""" | ||
|
||
import sys | ||
from pathlib import Path | ||
from typing import List | ||
|
||
from dolma import TrainConfig | ||
from dolma.exceptions import DolmaCliError | ||
from dolma.util import clean_opt, echo, prepare_cli_environment | ||
|
||
|
||
def main(save_path: Path, args_list: List[str]) -> None: | ||
cfg = TrainConfig.new(overrides=args_list) | ||
echo.info("Configuration:", cfg) | ||
cfg.save(save_path) | ||
echo.success(f"Config saved to {save_path}") | ||
|
||
|
||
if __name__ == "__main__": | ||
prepare_cli_environment() | ||
|
||
try: | ||
save_path, args_list = sys.argv[1], sys.argv[2:] | ||
except IndexError: | ||
raise DolmaCliError(f"Usage: {sys.argv[0]} [SAVE_PATH] [OPTIONS]") | ||
|
||
main(Path(save_path), [clean_opt(s) for s in args_list]) |
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