Automated push from Zaratan
Browse files- results/g5-d4-distill-s0.json +38 -0
- results/g5-d4-distill-s1.json +38 -0
- results/g5-d4-distill-s2.json +38 -0
- results/g5-d4-full-s0.json +38 -0
- results/g5-d4-full-s1.json +38 -0
- results/g5-d4-full-s2.json +38 -0
- results/g5-d4-matched-s0.json +38 -0
- results/g5-d4-matched-s1.json +38 -0
- results/g5-d4-matched-s2.json +38 -0
- results/g5-d4-mdlm-s0.json +38 -0
- results/g5-d4-mdlm-s1.json +38 -0
- results/g5-d4-mdlm-s2.json +38 -0
- results/g5-d6-distill-s0.json +38 -0
- results/g5-d6-distill-s1.json +38 -0
- results/g5-d6-distill-s2.json +38 -0
- results/g5-d6-full-s0.json +38 -0
- results/g5-d6-full-s1.json +38 -0
- results/g5-d6-full-s2.json +38 -0
- results/g5-d6-matched-s0.json +38 -0
- results/g5-d6-matched-s1.json +38 -0
- results/g5-d6-matched-s2.json +38 -0
- results/g5-d6-mdlm-s0.json +38 -0
- results/g5-d6-mdlm-s1.json +38 -0
- results/g5-d6-mdlm-s2.json +38 -0
- results/g5-d8-distill-s0.json +38 -0
- results/g5-d8-distill-s1.json +38 -0
- results/g5-d8-distill-s2.json +38 -0
- results/g5-d8-full-s0.json +38 -0
- results/g5-d8-full-s1.json +38 -0
- results/g5-d8-full-s2.json +38 -0
- results/g5-d8-matched-s0.json +38 -0
- results/g5-d8-matched-s1.json +38 -0
- results/g5-d8-matched-s2.json +38 -0
- results/g5-d8-mdlm-s0.json +38 -0
- results/g5-d8-mdlm-s1.json +38 -0
- results/g5-d8-mdlm-s2.json +38 -0
- slurm/g5.sh +41 -0
- slurm/smk.sh +32 -0
- src/data.py +57 -0
- src/diffusion.py +115 -0
- src/train_add.py +120 -0
results/g5-d4-distill-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-distill-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.094603908061981,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-distill-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-distill-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.182636868953705,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-distill-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-distill-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.177619067827861,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-full-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-full-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.199072353045145,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-full-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-full-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.2110337853431705,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-full-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-full-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.120807111263275,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-matched-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-matched-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.066857294241587,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-matched-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-matched-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.046454687913259,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-matched-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-matched-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.117052431901296,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-mdlm-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-mdlm-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.046641910076142,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-mdlm-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-mdlm-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.090229777495066,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d4-mdlm-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 4,
|
| 7 |
+
"seq_len": 16,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d4-mdlm-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.043796098232269,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 51200000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-distill-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-distill-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.2282985806465145,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-distill-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-distill-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.147757164637247,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-distill-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-distill-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.205686577161154,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-full-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-full-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.124441786607107,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-full-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-full-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.137926022211711,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-full-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-full-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.225931032498678,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-matched-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-matched-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.056125191847483,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-matched-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-matched-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.098791329065959,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-matched-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-matched-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.063978902498881,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-mdlm-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-mdlm-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.098314166069031,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-mdlm-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-mdlm-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.9960000000000001,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.0784336686134335,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d6-mdlm-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 6,
|
| 7 |
+
"seq_len": 22,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d6-mdlm-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.086201139291128,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 70400000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-distill-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-distill-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 0.9940000000000001,
|
| 25 |
+
"3": 0.9739999999999999,
|
| 26 |
+
"4": 0.968,
|
| 27 |
+
"6": 0.9620000000000001,
|
| 28 |
+
"8": 0.96,
|
| 29 |
+
"12": 0.96,
|
| 30 |
+
"16": 0.96
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.277184391021729,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-distill-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-distill-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.998,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.428394786516825,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-distill-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "distill",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-distill-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.321874841054281,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-full-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-full-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.998,
|
| 24 |
+
"2": 0.994,
|
| 25 |
+
"3": 0.998,
|
| 26 |
+
"4": 0.9899999999999999,
|
| 27 |
+
"6": 0.9880000000000001,
|
| 28 |
+
"8": 0.982,
|
| 29 |
+
"12": 0.982,
|
| 30 |
+
"16": 0.982
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.317351579666138,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-full-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-full-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.377502389748892,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-full-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "full",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-full-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 1.0,
|
| 24 |
+
"2": 1.0,
|
| 25 |
+
"3": 1.0,
|
| 26 |
+
"4": 1.0,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 7.370485206445058,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 2
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-matched-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-matched-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.916,
|
| 24 |
+
"2": 0.858,
|
| 25 |
+
"3": 0.8460000000000001,
|
| 26 |
+
"4": 0.8400000000000001,
|
| 27 |
+
"6": 0.866,
|
| 28 |
+
"8": 0.858,
|
| 29 |
+
"12": 0.858,
|
| 30 |
+
"16": 0.858
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.13342049519221,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-matched-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-matched-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.006,
|
| 24 |
+
"2": 0.006,
|
| 25 |
+
"3": 0.004,
|
| 26 |
+
"4": 0.004,
|
| 27 |
+
"6": 0.008,
|
| 28 |
+
"8": 0.008,
|
| 29 |
+
"12": 0.008,
|
| 30 |
+
"16": 0.008
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.116305422782898,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-matched-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "matched",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-matched-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.994,
|
| 24 |
+
"2": 0.9960000000000001,
|
| 25 |
+
"3": 0.9960000000000001,
|
| 26 |
+
"4": 0.998,
|
| 27 |
+
"6": 0.994,
|
| 28 |
+
"8": 0.994,
|
| 29 |
+
"12": 0.994,
|
| 30 |
+
"16": 0.994
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.115453656514486,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-mdlm-s0.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 0,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-mdlm-s0"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.064,
|
| 24 |
+
"2": 0.268,
|
| 25 |
+
"3": 0.20400000000000001,
|
| 26 |
+
"4": 0.202,
|
| 27 |
+
"6": 0.10800000000000001,
|
| 28 |
+
"8": 0.09999999999999999,
|
| 29 |
+
"12": 0.04,
|
| 30 |
+
"16": 0.04
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.100277105967204,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-mdlm-s1.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 1,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-mdlm-s1"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.0,
|
| 24 |
+
"2": 0.0,
|
| 25 |
+
"3": 0.0,
|
| 26 |
+
"4": 0.0,
|
| 27 |
+
"6": 0.0,
|
| 28 |
+
"8": 0.0,
|
| 29 |
+
"12": 0.0,
|
| 30 |
+
"16": 0.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.152010726928711,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
results/g5-d8-mdlm-s2.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"args": {
|
| 3 |
+
"mode": "mdlm",
|
| 4 |
+
"K": 4,
|
| 5 |
+
"lam": 1.0,
|
| 6 |
+
"digits": 8,
|
| 7 |
+
"seq_len": 28,
|
| 8 |
+
"n_train": 200000,
|
| 9 |
+
"n_eval": 500,
|
| 10 |
+
"eval_bs": 100,
|
| 11 |
+
"d": 384,
|
| 12 |
+
"layers": 6,
|
| 13 |
+
"heads": 6,
|
| 14 |
+
"pe": "rope",
|
| 15 |
+
"bs": 128,
|
| 16 |
+
"steps": 25000,
|
| 17 |
+
"lr": 0.0003,
|
| 18 |
+
"warmup": 500,
|
| 19 |
+
"seed": 2,
|
| 20 |
+
"out": "/scratch/zt1/project/msml612/user/govind02/pcmd/runs/g5-d8-mdlm-s2"
|
| 21 |
+
},
|
| 22 |
+
"accuracy_by_passes": {
|
| 23 |
+
"1": 0.992,
|
| 24 |
+
"2": 0.992,
|
| 25 |
+
"3": 0.998,
|
| 26 |
+
"4": 0.998,
|
| 27 |
+
"6": 1.0,
|
| 28 |
+
"8": 1.0,
|
| 29 |
+
"12": 1.0,
|
| 30 |
+
"16": 1.0
|
| 31 |
+
},
|
| 32 |
+
"minutes": 4.113563962777456,
|
| 33 |
+
"compute": {
|
| 34 |
+
"params": 10649088,
|
| 35 |
+
"train_tokens": 89600000,
|
| 36 |
+
"fwd_per_step": 1
|
| 37 |
+
}
|
| 38 |
+
}
|
slurm/g5.sh
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Grid 5 - Parallelism-Matched Diffusion on addition (unique answer, chained).
|
| 3 |
+
#
|
| 4 |
+
# mdlm standard uniform-t training (baseline)
|
| 5 |
+
# matched train only at the masking ratios a K-pass decode visits
|
| 6 |
+
# distill uniform training + one-pass supervision
|
| 7 |
+
# full matched schedule + one-pass supervision (the method)
|
| 8 |
+
#
|
| 9 |
+
# Prediction: the gap should be largest at FEW passes (high parallelism), where
|
| 10 |
+
# the baseline has to fit the whole carry chain into one forward pass having
|
| 11 |
+
# been trained mostly on nearly-complete states it never sees there. At many
|
| 12 |
+
# passes all methods should converge, since sequential decoding amortises the
|
| 13 |
+
# computation anyway.
|
| 14 |
+
#SBATCH -J g5
|
| 15 |
+
#SBATCH -p gpu-h100
|
| 16 |
+
#SBATCH --gpus=h100:1
|
| 17 |
+
#SBATCH -c 8
|
| 18 |
+
#SBATCH --mem=64g
|
| 19 |
+
#SBATCH -t 06:00:00
|
| 20 |
+
#SBATCH -o logs/g5-%A_%a.out
|
| 21 |
+
#SBATCH --array=0-35%12
|
| 22 |
+
source /etc/profile
|
| 23 |
+
SCR=/scratch/zt1/project/msml612/user/$USER
|
| 24 |
+
module load python/3.10.10
|
| 25 |
+
export PYTHONPATH=
|
| 26 |
+
PY=$SCR/hf_env/bin/python
|
| 27 |
+
cd $SCR/pcmd/src
|
| 28 |
+
|
| 29 |
+
I=$SLURM_ARRAY_TASK_ID
|
| 30 |
+
MODES=(mdlm matched distill full); DIG=(4 6 8); SEEDS=(0 1 2)
|
| 31 |
+
M=${MODES[$((I / 9))]}
|
| 32 |
+
D=${DIG[$(((I % 9) / 3))]}
|
| 33 |
+
S=${SEEDS[$((I % 3))]}
|
| 34 |
+
SL=$(( 3 * D + 4 ))
|
| 35 |
+
|
| 36 |
+
NAME="g5-d$D-$M-s$S"
|
| 37 |
+
echo "=== $NAME ==="
|
| 38 |
+
$PY train_add.py --mode $M --digits $D --seq_len $SL --seed $S \
|
| 39 |
+
--n_train 200000 --n_eval 500 --eval_bs 100 \
|
| 40 |
+
--d 384 --layers 6 --heads 6 --bs 128 --steps 25000 --lr 3e-4 \
|
| 41 |
+
--K 4 --lam 1.0 --out $SCR/pcmd/runs/$NAME
|
slurm/smk.sh
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -J smk
|
| 3 |
+
#SBATCH -p gpu-h100
|
| 4 |
+
#SBATCH --gpus=h100:1
|
| 5 |
+
#SBATCH -c 8
|
| 6 |
+
#SBATCH --mem=32g
|
| 7 |
+
#SBATCH -t 00:30:00
|
| 8 |
+
#SBATCH -o logs/smk-%j.out
|
| 9 |
+
source /etc/profile
|
| 10 |
+
SCR=/scratch/zt1/project/msml612/user/$USER
|
| 11 |
+
module load python/3.10.10
|
| 12 |
+
export PYTHONPATH=
|
| 13 |
+
cd $SCR/pcmd/src
|
| 14 |
+
$SCR/hf_env/bin/python - <<'PY'
|
| 15 |
+
import sys; sys.path.insert(0,'.')
|
| 16 |
+
import numpy as np
|
| 17 |
+
from data import build_addition
|
| 18 |
+
X, A, tok = build_addition(300, 6, 32, seed=3, exact=True)
|
| 19 |
+
bad = 0
|
| 20 |
+
for i in range(len(X)):
|
| 21 |
+
s = [tok.itos[t] for t in X[i] if t != tok.pad]
|
| 22 |
+
a = int("".join(s[:s.index("+")])); b = int("".join(s[s.index("+")+1:s.index("=")]))
|
| 23 |
+
ans = int("".join(reversed(s[s.index("=")+1:])))
|
| 24 |
+
bad += (a + b != ans)
|
| 25 |
+
print(f" data check: {bad}/300 wrong; answer positions/example = {A.sum(1)[:3]}")
|
| 26 |
+
PY
|
| 27 |
+
for M in mdlm matched distill full; do
|
| 28 |
+
echo "--- $M ---"
|
| 29 |
+
$SCR/hf_env/bin/python train_add.py --mode $M --digits 3 --seq_len 16 \
|
| 30 |
+
--n_train 4000 --n_eval 60 --eval_bs 30 --d 64 --layers 2 --heads 2 \
|
| 31 |
+
--bs 32 --steps 200 --K 4 --out /tmp/a$M 2>&1 | tail -2
|
| 32 |
+
done
|
src/data.py
CHANGED
|
@@ -130,3 +130,60 @@ def build_probe(n, seq_len, coupling, seed=0, task="copy"):
|
|
| 130 |
else:
|
| 131 |
raise ValueError(task)
|
| 132 |
return X, tok
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
else:
|
| 131 |
raise ValueError(task)
|
| 132 |
return X, tok
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
# ---------------------------------------------------------------------------
|
| 136 |
+
# Addition: the canonical UNIQUE-answer task with chained inter-token
|
| 137 |
+
# dependence. Given the operands the answer is fully determined, so every
|
| 138 |
+
# position's true marginal is a point mass and parallel decoding faces no
|
| 139 |
+
# information-theoretic barrier - unlike `agree`/`parity`, where the value is
|
| 140 |
+
# genuinely free and the bound is unbeatable. What remains is a computation
|
| 141 |
+
# problem: digit i needs the carry out of digit i-1, and sequential decoding
|
| 142 |
+
# amortises that chain across passes while parallel decoding must fit it inside
|
| 143 |
+
# one fixed-depth forward pass.
|
| 144 |
+
# ---------------------------------------------------------------------------
|
| 145 |
+
|
| 146 |
+
DIGITS10 = "0123456789"
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
class AddTokenizer:
|
| 150 |
+
def __init__(self):
|
| 151 |
+
self.itos = ["[MASK]", "[PAD]", "+", "="] + list(DIGITS10)
|
| 152 |
+
self.stoi = {c: i for i, c in enumerate(self.itos)}
|
| 153 |
+
self.mask = self.stoi["[MASK]"]
|
| 154 |
+
self.pad = self.stoi["[PAD]"]
|
| 155 |
+
|
| 156 |
+
def __len__(self):
|
| 157 |
+
return len(self.itos)
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
def build_addition(n, digits, seq_len, seed=0, exact=False):
|
| 161 |
+
"""Returns (X, answer_mask, tok).
|
| 162 |
+
|
| 163 |
+
Layout: operand a, '+', operand b, '=', then the answer written
|
| 164 |
+
units-first. `answer_mask` marks the positions the model must produce; the
|
| 165 |
+
prompt is always visible, so the task is conditional and the answer unique.
|
| 166 |
+
"""
|
| 167 |
+
tok = AddTokenizer()
|
| 168 |
+
rng = np.random.default_rng(seed)
|
| 169 |
+
X = np.full((n, seq_len), tok.pad, dtype=np.int64)
|
| 170 |
+
A = np.zeros((n, seq_len), dtype=bool)
|
| 171 |
+
|
| 172 |
+
for i in range(n):
|
| 173 |
+
d = digits if exact else int(rng.integers(1, digits + 1))
|
| 174 |
+
|
| 175 |
+
def draw(nd):
|
| 176 |
+
ds = rng.integers(0, 10, size=nd)
|
| 177 |
+
if nd > 1 and ds[0] == 0:
|
| 178 |
+
ds[0] = rng.integers(1, 10)
|
| 179 |
+
return "".join(str(int(v)) for v in ds)
|
| 180 |
+
|
| 181 |
+
pa, pb = draw(d), draw(d)
|
| 182 |
+
s = str(int(pa) + int(pb))[::-1] # units first
|
| 183 |
+
seq = list(pa) + ["+"] + list(pb) + ["="] + list(s)
|
| 184 |
+
if len(seq) > seq_len:
|
| 185 |
+
raise ValueError(f"seq_len {seq_len} too small for {d} digits")
|
| 186 |
+
ids = [tok.stoi[c] for c in seq]
|
| 187 |
+
X[i, : len(ids)] = ids
|
| 188 |
+
A[i, len(pa) + len(pb) + 2: len(ids)] = True # answer positions only
|
| 189 |
+
return X, A, tok
|
src/diffusion.py
CHANGED
|
@@ -317,3 +317,118 @@ def dependence_weighted_entropy(model, x0, tok, t_min=None):
|
|
| 317 |
p = model(xt).softmax(-1)
|
| 318 |
h2 = -(p.pow(2).sum(-1).clamp_min(1e-9)).log() # Renyi-2 entropy
|
| 319 |
return (d * h2 * m).sum() / m.sum().clamp_min(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
p = model(xt).softmax(-1)
|
| 318 |
h2 = -(p.pow(2).sum(-1).clamp_min(1e-9)).log() # Renyi-2 entropy
|
| 319 |
return (d * h2 * m).sum() / m.sum().clamp_min(1)
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
# ===========================================================================
|
| 323 |
+
# Conditional objectives for UNIQUE-answer tasks (prompt visible, answer
|
| 324 |
+
# masked). Here the target is deterministic, so unlike the free-choice probes
|
| 325 |
+
# there is a correct answer to aim at and coordination is learnable.
|
| 326 |
+
# ===========================================================================
|
| 327 |
+
|
| 328 |
+
def _cond_mask(x0, amask, tok, t):
|
| 329 |
+
"""Mask a fraction t of the ANSWER positions only; the prompt stays visible."""
|
| 330 |
+
dev = x0.device
|
| 331 |
+
r = torch.rand_like(amask, dtype=torch.float)
|
| 332 |
+
m = (r < t[:, None]) & amask
|
| 333 |
+
# never leave an example with nothing to predict
|
| 334 |
+
empty = ~m.any(1)
|
| 335 |
+
if empty.any():
|
| 336 |
+
first = amask.float().argmax(1)
|
| 337 |
+
m[empty, first[empty]] = True
|
| 338 |
+
return m
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
def cond_mdlm_loss(model, x0, amask, tok, t_dist="uniform", K=None):
|
| 342 |
+
"""Baseline, plus the schedule-matched variant.
|
| 343 |
+
|
| 344 |
+
t_dist="uniform" is standard MDLM: every masking ratio is trained equally.
|
| 345 |
+
t_dist="matched" instead draws t from the ratios a K-pass decode actually
|
| 346 |
+
visits, namely {1, (K-1)/K, ..., 1/K}. Standard training spends most of its
|
| 347 |
+
capacity on nearly-complete states that high-parallelism decoding never
|
| 348 |
+
sees, which is a plain train/inference mismatch.
|
| 349 |
+
"""
|
| 350 |
+
B, L = x0.shape
|
| 351 |
+
dev = x0.device
|
| 352 |
+
if t_dist == "matched" and K:
|
| 353 |
+
idx = torch.randint(1, K + 1, (B,), device=dev).float()
|
| 354 |
+
t = idx / K
|
| 355 |
+
else:
|
| 356 |
+
t = torch.rand(B, device=dev).clamp_min(1.0 / L)
|
| 357 |
+
|
| 358 |
+
m = _cond_mask(x0, amask, tok, t)
|
| 359 |
+
xt = torch.where(m, torch.full_like(x0, tok.mask), x0)
|
| 360 |
+
logits = model(xt)
|
| 361 |
+
ce = F.cross_entropy(logits.reshape(-1, logits.size(-1)), x0.reshape(-1),
|
| 362 |
+
reduction="none").view(B, L)
|
| 363 |
+
return ((ce * m).sum(1) / m.sum(1).clamp_min(1)).mean()
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
def sequential_distill_loss(model, x0, amask, tok, chunk=8):
|
| 367 |
+
"""THE METHOD: distil the sequential computation into a single pass.
|
| 368 |
+
|
| 369 |
+
Sequential decoding is strong because each step can read the digits already
|
| 370 |
+
written, letting the carry chain unroll across passes. A one-pass parallel
|
| 371 |
+
prediction has to fit that whole chain inside a fixed depth, which is why
|
| 372 |
+
accuracy collapses as passes are reduced.
|
| 373 |
+
|
| 374 |
+
So we train the ONE-PASS prediction, from the fully masked answer, to match
|
| 375 |
+
the answer the model produces when it is allowed to decode sequentially.
|
| 376 |
+
Because the answer is unique, the teacher's target is the same every time it
|
| 377 |
+
sees the same prompt - which is exactly what was missing on the free-choice
|
| 378 |
+
probes, where the teacher's arbitrary pick averaged back to uniform and the
|
| 379 |
+
signal cancelled.
|
| 380 |
+
|
| 381 |
+
Ground truth is available here, so the teacher is only a convenience: the
|
| 382 |
+
loss below supervises the fully-masked one-pass prediction directly against
|
| 383 |
+
the true answer, which is the strongest possible version of the same idea.
|
| 384 |
+
"""
|
| 385 |
+
B, L = x0.shape
|
| 386 |
+
xt = torch.where(amask, torch.full_like(x0, tok.mask), x0) # whole answer hidden
|
| 387 |
+
logits = model(xt)
|
| 388 |
+
ce = F.cross_entropy(logits.reshape(-1, logits.size(-1)), x0.reshape(-1),
|
| 389 |
+
reduction="none").view(B, L)
|
| 390 |
+
return ((ce * amask).sum(1) / amask.sum(1).clamp_min(1)).mean()
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
def pmd_loss(model, x0, amask, tok, mode="mdlm", K=8, lam=1.0):
|
| 394 |
+
"""Parallelism-Matched Diffusion.
|
| 395 |
+
|
| 396 |
+
mdlm standard uniform-t training (baseline)
|
| 397 |
+
matched train only at the masking ratios a K-pass decode visits
|
| 398 |
+
distill uniform training + one-pass supervision (the method)
|
| 399 |
+
full matched schedule + one-pass supervision
|
| 400 |
+
"""
|
| 401 |
+
if mode == "mdlm":
|
| 402 |
+
return cond_mdlm_loss(model, x0, amask, tok, "uniform")
|
| 403 |
+
if mode == "matched":
|
| 404 |
+
return cond_mdlm_loss(model, x0, amask, tok, "matched", K)
|
| 405 |
+
base = cond_mdlm_loss(model, x0, amask, tok,
|
| 406 |
+
"matched" if mode == "full" else "uniform", K)
|
| 407 |
+
return base + lam * sequential_distill_loss(model, x0, amask, tok)
|
| 408 |
+
|
| 409 |
+
|
| 410 |
+
@torch.no_grad()
|
| 411 |
+
def cond_decode(model, x0, amask, tok, steps, device):
|
| 412 |
+
"""Reveal the answer over `steps` passes, prompt fixed throughout."""
|
| 413 |
+
x = torch.where(amask, torch.full_like(x0, tok.mask), x0).to(device)
|
| 414 |
+
am = amask.to(device)
|
| 415 |
+
B, L = x.shape
|
| 416 |
+
n_ans = int(am[0].sum())
|
| 417 |
+
pred = None
|
| 418 |
+
for s in range(steps, 0, -1):
|
| 419 |
+
masked = (x == tok.mask) & am
|
| 420 |
+
if not masked.any():
|
| 421 |
+
break
|
| 422 |
+
logits = model(x)
|
| 423 |
+
conf, pred = logits.softmax(-1).max(-1)
|
| 424 |
+
conf = conf.masked_fill(~masked, -1e9)
|
| 425 |
+
left = int(n_ans * (s - 1) / steps)
|
| 426 |
+
for b in range(B):
|
| 427 |
+
k = max(0, int(masked[b].sum()) - left)
|
| 428 |
+
if k:
|
| 429 |
+
idx = conf[b].topk(k).indices
|
| 430 |
+
x[b, idx] = pred[b, idx]
|
| 431 |
+
rem = (x == tok.mask) & am
|
| 432 |
+
if rem.any() and pred is not None:
|
| 433 |
+
x[rem] = pred[rem]
|
| 434 |
+
return x
|
src/train_add.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Parallelism-Matched Diffusion on addition: a unique-answer, chained task.
|
| 2 |
+
|
| 3 |
+
Addition is the right testbed because the answer is fully determined by the
|
| 4 |
+
prompt. Every position's true marginal is a point mass, so there is no
|
| 5 |
+
information-theoretic obstacle to parallel decoding - unlike free-choice tasks,
|
| 6 |
+
where two independent draws simply cannot agree and no training can help. What
|
| 7 |
+
is left is a computation problem, and computation problems are trainable.
|
| 8 |
+
|
| 9 |
+
Headline axis: exact-match accuracy against the number of denoising passes,
|
| 10 |
+
from fully parallel (1) to fully sequential.
|
| 11 |
+
"""
|
| 12 |
+
import argparse, json, math, os, time
|
| 13 |
+
import numpy as np
|
| 14 |
+
import torch
|
| 15 |
+
|
| 16 |
+
from data import build_addition
|
| 17 |
+
from model import Transformer
|
| 18 |
+
import diffusion as dfn
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def get_args():
|
| 22 |
+
p = argparse.ArgumentParser()
|
| 23 |
+
p.add_argument("--mode", choices=["mdlm", "matched", "distill", "full"], default="mdlm")
|
| 24 |
+
p.add_argument("--K", type=int, default=8, help="parallelism the schedule is matched to")
|
| 25 |
+
p.add_argument("--lam", type=float, default=1.0, help="one-pass supervision weight")
|
| 26 |
+
p.add_argument("--digits", type=int, default=6)
|
| 27 |
+
p.add_argument("--seq_len", type=int, default=32)
|
| 28 |
+
p.add_argument("--n_train", type=int, default=200000)
|
| 29 |
+
p.add_argument("--n_eval", type=int, default=500)
|
| 30 |
+
p.add_argument("--eval_bs", type=int, default=100)
|
| 31 |
+
p.add_argument("--d", type=int, default=384)
|
| 32 |
+
p.add_argument("--layers", type=int, default=6)
|
| 33 |
+
p.add_argument("--heads", type=int, default=6)
|
| 34 |
+
p.add_argument("--pe", default="rope")
|
| 35 |
+
p.add_argument("--bs", type=int, default=128)
|
| 36 |
+
p.add_argument("--steps", type=int, default=20000)
|
| 37 |
+
p.add_argument("--lr", type=float, default=3e-4)
|
| 38 |
+
p.add_argument("--warmup", type=int, default=500)
|
| 39 |
+
p.add_argument("--seed", type=int, default=0)
|
| 40 |
+
p.add_argument("--out", default="runs/dev")
|
| 41 |
+
return p.parse_args()
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
PASS_GRID = [1, 2, 3, 4, 6, 8, 12, 16]
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def exact_match(pred, gold, amask, tok):
|
| 48 |
+
ok = 0
|
| 49 |
+
for p, g, a in zip(pred.tolist(), gold.tolist(), amask.tolist()):
|
| 50 |
+
pa = [p[i] for i in range(len(a)) if a[i]]
|
| 51 |
+
ga = [g[i] for i in range(len(a)) if a[i]]
|
| 52 |
+
ok += pa == ga
|
| 53 |
+
return ok / len(gold)
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
@torch.no_grad()
|
| 57 |
+
def evaluate(model, a, tok, device):
|
| 58 |
+
model.eval()
|
| 59 |
+
out = {}
|
| 60 |
+
X, A, _ = build_addition(a.n_eval, a.digits, a.seq_len, seed=90_000, exact=True)
|
| 61 |
+
X, A = torch.from_numpy(X), torch.from_numpy(A)
|
| 62 |
+
for steps in PASS_GRID:
|
| 63 |
+
accs = []
|
| 64 |
+
for i in range(0, len(X), a.eval_bs):
|
| 65 |
+
xb, ab = X[i:i + a.eval_bs].to(device), A[i:i + a.eval_bs].to(device)
|
| 66 |
+
pred = dfn.cond_decode(model, xb, ab, tok, steps, device)
|
| 67 |
+
accs.append(exact_match(pred.cpu(), xb.cpu(), ab.cpu(), tok))
|
| 68 |
+
out[str(steps)] = float(np.mean(accs))
|
| 69 |
+
model.train()
|
| 70 |
+
return out
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
def main():
|
| 74 |
+
a = get_args()
|
| 75 |
+
torch.manual_seed(a.seed); np.random.seed(a.seed)
|
| 76 |
+
dev = "cuda" if torch.cuda.is_available() else "cpu"
|
| 77 |
+
os.makedirs(a.out, exist_ok=True)
|
| 78 |
+
|
| 79 |
+
X, A, tok = build_addition(a.n_train, a.digits, a.seq_len, seed=a.seed)
|
| 80 |
+
X, A = torch.from_numpy(X), torch.from_numpy(A)
|
| 81 |
+
|
| 82 |
+
model = Transformer(len(tok), a.d, a.layers, a.heads, a.pe,
|
| 83 |
+
causal=False, max_len=a.seq_len + 8).to(dev)
|
| 84 |
+
print(f"[{a.mode}] params={model.n_params()/1e6:.2f}M digits<={a.digits} "
|
| 85 |
+
f"K={a.K} device={dev}", flush=True)
|
| 86 |
+
|
| 87 |
+
opt = torch.optim.AdamW(model.parameters(), lr=a.lr, weight_decay=0.01)
|
| 88 |
+
sched = torch.optim.lr_scheduler.LambdaLR(
|
| 89 |
+
opt, lambda s: min(1.0, (s + 1) / a.warmup) *
|
| 90 |
+
0.5 * (1 + math.cos(math.pi * min(1.0, s / a.steps))))
|
| 91 |
+
amp = dict(device_type="cuda", dtype=torch.bfloat16) if dev == "cuda" \
|
| 92 |
+
else dict(device_type="cpu", enabled=False)
|
| 93 |
+
|
| 94 |
+
t0 = time.time()
|
| 95 |
+
for step in range(a.steps):
|
| 96 |
+
idx = torch.randint(0, len(X), (a.bs,))
|
| 97 |
+
xb, ab = X[idx].to(dev), A[idx].to(dev)
|
| 98 |
+
opt.zero_grad(set_to_none=True)
|
| 99 |
+
with torch.autocast(**amp):
|
| 100 |
+
loss = dfn.pmd_loss(model, xb, ab, tok, a.mode, a.K, a.lam)
|
| 101 |
+
loss.backward()
|
| 102 |
+
torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
|
| 103 |
+
opt.step(); sched.step()
|
| 104 |
+
if step % 2000 == 0:
|
| 105 |
+
print(f"step {step:6d} loss {loss.item():.4f} ({time.time()-t0:.0f}s)", flush=True)
|
| 106 |
+
|
| 107 |
+
acc = evaluate(model, a, tok, dev)
|
| 108 |
+
n_par = model.n_params()
|
| 109 |
+
json.dump({"args": vars(a), "accuracy_by_passes": acc,
|
| 110 |
+
"minutes": (time.time() - t0) / 60,
|
| 111 |
+
"compute": {"params": n_par,
|
| 112 |
+
"train_tokens": a.steps * a.bs * a.seq_len,
|
| 113 |
+
"fwd_per_step": 2 if a.mode in ("distill", "full") else 1}},
|
| 114 |
+
open(os.path.join(a.out, "result.json"), "w"), indent=2)
|
| 115 |
+
torch.save(model.state_dict(), os.path.join(a.out, "model.pt"))
|
| 116 |
+
print("FINAL", json.dumps(acc), flush=True)
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
if __name__ == "__main__":
|
| 120 |
+
main()
|