1
# DISCLAIMER: This is the configuration file for the GPT-NeoX-20B model as it was trained on 96x 40GB A100
2
# GPUs. Depending on your system configuration, you may need to change some parameters in order to fit
6
# Tokenizer / checkpoint settings - you will need to change these to the location you have them saved in
7
"vocab_file": "./20B_checkpoints/20B_tokenizer.json",
8
"save": "./20B_checkpoints",
9
"load": "./20B_checkpoints",
11
# If finetuning, edit the following to the location of your finetuning dataset:
12
"data_path": "./data/pile_20B_tokenizer/pile_20B_tokenizer_text_document",
14
# parallelism settings ( you will want to change these based on your cluster setup, ideally scheduling pipeline stages
15
# across the node boundaries )
16
"pipe_parallel_size": 4,
17
"model_parallel_size": 2,
22
"num_attention_heads": 64,
24
"max_position_embeddings": 2048,
28
"no_weight_tying": true,
29
"gpt_j_residual": true,
30
"output_layer_parallelism": "column",
31
"scaled_upper_triang_masked_softmax_fusion": true,
32
"bias_gelu_fusion": true,
34
"layernorm_fusion": false,
37
"init_method": "small_init",
38
"output_layer_init_method": "wang_init",
52
# for all zero_optimization options, see https://www.deepspeed.ai/docs/config-json/#zero-optimizations-for-fp16-training
53
"zero_optimization": {
55
"allgather_partitions": True,
56
"allgather_bucket_size": 1260000000,
58
"reduce_scatter": True,
59
"reduce_bucket_size": 1260000000,
60
"contiguous_gradients": True,
63
# batch / data settings (assuming 96 GPUs)
64
"train_micro_batch_size_per_gpu": 4,
65
"gradient_accumulation_steps": 32,
69
# activation checkpointing
70
"checkpoint_activations": true,
71
"checkpoint_num_layers": 1,
72
"partition_activations": false,
73
"synchronize_each_layer": true,
76
"gradient_clipping": 1.0,
79
"attention_dropout": 0,
86
"loss_scale_window": 1000,
87
"initial_scale_power": 12,
92
# misc. training settings
93
"train_iters": 150000,
94
"lr_decay_iters": 150000,
96
"distributed_backend": "nccl",
97
"lr_decay_style": "cosine",
99
"checkpoint_factor": 500, # this variable previously called `save-interval`
100
"eval_interval": 1000,
105
"steps_per_print": 2,
106
"wall_clock_breakdown": false,
109
"tokenizer_type": "HFTokenizer",
110
"tensorboard-dir": "./tensorboard",