File size: 3,985 Bytes
4417138 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | from src.train import train
import tqdm
params = [
{
"testing": False,
"seed": 97,
"data_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}",
"n_embd": n_embd,
"n_head": n_head,
"n_layer": n_layer,
"ff_width": 4,
"intermediate_schedules": True,
"train_batch_size": 512,
"val_batch_size": 256,
"nb_epochs": 5,
"early_stopping_patience": 15,
"dropout": 0.0,
"checkpoint_interval_ratio": 1.0,
"decay_lr": True,
"lr_partitions_ratios": [0.66],
"init_lr": 1e-4,
"max_lr": 1e-3,
"min_lr": 5e-5,
"lr_warmup_iters_ratio": 0.1,
"lr_decay_iters_ratio": 0.95,
"beta1": 0.9,
"beta2": 0.95,
"weight_decay": wd,
"grad_clip": 1.0,
"compile": "",
"compile_mode": "default",
"save_only_last_checkpoint": True,
"output_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}/train_nEmbd{n_embd}_nHead{n_head}_nLayer{n_layer}",
}
for nb_jobs in [9]
for nb_machines in [6]
for top_k in [0]
for n_embd in [6, 8, 12, 24, 36, 48, 64]
for n_head in [1, 2]
for n_layer in [1, 2, 3, 4]
for wd in [10e+0]
]
for param in (pbar:=tqdm.tqdm(params)):
pbar.set_description(f"Section 1. Phase 1 Configuration: n_embd={param['n_embd']}, n_head={param['n_head']}, n_layer={param['n_layer']}")
train(**param)
params = [
{
"testing": False,
"seed": 97,
"data_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}",
"n_embd": n_embd,
"n_head": n_head,
"n_layer": n_layer,
"ff_width": 4,
"intermediate_schedules": True,
"train_batch_size": 512,
"val_batch_size": 256,
"nb_epochs": 5,
"early_stopping_patience": 15,
"dropout": 0.0,
"checkpoint_interval_ratio": 1.0,
"decay_lr": True,
"lr_partitions_ratios": [0.66],
"init_lr": 1e-4,
"max_lr": 1e-3,
"min_lr": 5e-5,
"lr_warmup_iters_ratio": 0.1,
"lr_decay_iters_ratio": 0.95,
"beta1": 0.9,
"beta2": 0.95,
"weight_decay": wd,
"grad_clip": 1.0,
"compile": "",
"compile_mode": "default",
"save_only_last_checkpoint": True,
"output_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}/train_nEmbd{n_embd}_nHead{n_head}_nLayer{n_layer}",
}
for nb_jobs in [9]
for nb_machines in [6]
for top_k in [0]
for n_embd in [6 + 3*i for i in range(0, 21)]
for n_head in [3]
for n_layer in [1, 2, 3, 4]
for wd in [10e+0]
]
for param in (pbar:=tqdm.tqdm(params)):
pbar.set_description(f"Section 2. Phase 1 Configuration: n_embd={param['n_embd']}, n_head={param['n_head']}, n_layer={param['n_layer']}")
train(**param)
params = [
{
"testing": False,
"seed": 97,
"data_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}",
"n_embd": n_embd,
"n_head": n_head,
"n_layer": n_layer,
"ff_width": 4,
"intermediate_schedules": True,
"train_batch_size": 512,
"val_batch_size": 256,
"nb_epochs": 5,
"early_stopping_patience": 15,
"dropout": 0.0,
"checkpoint_interval_ratio": 1.0,
"decay_lr": True,
"lr_partitions_ratios": [0.66],
"init_lr": 1e-4,
"max_lr": 1e-3,
"min_lr": 5e-5,
"lr_warmup_iters_ratio": 0.1,
"lr_decay_iters_ratio": 0.95,
"beta1": 0.9,
"beta2": 0.95,
"weight_decay": wd,
"grad_clip": 1.0,
"compile": "",
"compile_mode": "default",
"save_only_last_checkpoint": True,
"output_dir": f"outputs/exhaustive_{nb_jobs}_{nb_machines}/top_{top_k}/train_nEmbd{n_embd}_nHead{n_head}_nLayer{n_layer}",
}
for nb_jobs in [9]
for nb_machines in [6]
for top_k in [0]
for n_embd in [8 + 4*i for i in range(0, 15)]
for n_head in [4]
for n_layer in [1, 2, 3, 4]
for wd in [10e+0]
]
for param in (pbar:=tqdm.tqdm(params)):
pbar.set_description(f"Section 3. Phase 1 Configuration: n_embd={param['n_embd']}, n_head={param['n_head']}, n_layer={param['n_layer']}")
train(**param) |