fix(spatial): 预热 100 步是脚枪,默认改为 300
lr 3e-3 下前 100 步是一次 10 倍的跳变,自由度集合任务掉进去就再没出来。 同 lr、同步数,只改这一个数:seed0 的 dof.set 0.203 → 1.000,三种子在 14 个家族上 全部 1.000(含弃权)。
This commit is contained in:
1 parent
0c5ceb2d2c
commit
188419a275
6 files changed
+100
-24
No files matched your search
@@ -1,15 +1,45 @@
|
|||||||
{
|
{
|
||||||
"seed": 0,
|
"seed": 0,
|
||||||
"model": {
|
"model": {
|
||||||
"d": 192, "n_layer": 4, "n_head": 6, "dropout": 0.1, "max_entities": 32,
|
"d": 192,
|
||||||
"rounds": 2, "n_evidence": 4
|
"n_layer": 4,
|
||||||
|
"n_head": 6,
|
||||||
|
"dropout": 0.1,
|
||||||
|
"max_entities": 32,
|
||||||
|
"rounds": 2,
|
||||||
|
"n_evidence": 4
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"train_families": ["cond.p1", "cond.p3", "area.sup2", "area.sup3", "area.free", "dof.c6", "dof.c6r"],
|
"train_families": [
|
||||||
"val_families": ["cond.p1h", "area.sup2h", "dof.c6h"],
|
"cond.p1",
|
||||||
"test_families": ["cond.p1h", "area.sup2h", "dof.c6h"]
|
"cond.p3",
|
||||||
|
"area.sup2",
|
||||||
|
"area.sup3",
|
||||||
|
"area.free",
|
||||||
|
"dof.c6",
|
||||||
|
"dof.c6r"
|
||||||
|
],
|
||||||
|
"val_families": [
|
||||||
|
"cond.p1h",
|
||||||
|
"area.sup2h",
|
||||||
|
"dof.c6h"
|
||||||
|
],
|
||||||
|
"test_families": [
|
||||||
|
"cond.p1h",
|
||||||
|
"area.sup2h",
|
||||||
|
"dof.c6h"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"optim": {
|
||||||
|
"lr": 0.003,
|
||||||
|
"weight_decay": 0.01,
|
||||||
|
"steps": 2400,
|
||||||
|
"batch": 32,
|
||||||
|
"log_every": 400,
|
||||||
|
"warmup": 300
|
||||||
|
},
|
||||||
|
"eval": {
|
||||||
|
"n": 192
|
||||||
},
|
},
|
||||||
"optim": { "lr": 0.003, "weight_decay": 0.01, "steps": 2400, "batch": 32, "log_every": 400 },
|
|
||||||
"eval": { "n": 192 },
|
|
||||||
"out_dir": "out_spatial/cross"
|
"out_dir": "out_spatial/cross"
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,8 @@
|
|||||||
"weight_decay": 0.01,
|
"weight_decay": 0.01,
|
||||||
"steps": 4800,
|
"steps": 4800,
|
||||||
"batch": 32,
|
"batch": 32,
|
||||||
"log_every": 400
|
"log_every": 400,
|
||||||
|
"warmup": 300
|
||||||
},
|
},
|
||||||
"eval": {
|
"eval": {
|
||||||
"n": 192
|
"n": 192
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
"weight_decay": 0.01,
|
"weight_decay": 0.01,
|
||||||
"steps": 4800,
|
"steps": 4800,
|
||||||
"batch": 32,
|
"batch": 32,
|
||||||
"log_every": 400
|
"log_every": 400,
|
||||||
|
"warmup": 300
|
||||||
},
|
},
|
||||||
"eval": {
|
"eval": {
|
||||||
"n": 192
|
"n": 192
|
||||||
|
|||||||
@@ -1,15 +1,35 @@
|
|||||||
{
|
{
|
||||||
"seed": 0,
|
"seed": 0,
|
||||||
"model": {
|
"model": {
|
||||||
"d": 192, "n_layer": 4, "n_head": 6, "dropout": 0.0, "max_entities": 32,
|
"d": 192,
|
||||||
"rounds": 2, "n_evidence": 4
|
"n_layer": 4,
|
||||||
|
"n_head": 6,
|
||||||
|
"dropout": 0.0,
|
||||||
|
"max_entities": 32,
|
||||||
|
"rounds": 2,
|
||||||
|
"n_evidence": 4
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"train_families": ["cond.p3"],
|
"train_families": [
|
||||||
"val_families": ["cond.p3"],
|
"cond.p3"
|
||||||
"test_families": ["cond.p3"]
|
],
|
||||||
|
"val_families": [
|
||||||
|
"cond.p3"
|
||||||
|
],
|
||||||
|
"test_families": [
|
||||||
|
"cond.p3"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"optim": {
|
||||||
|
"lr": 0.003,
|
||||||
|
"weight_decay": 0.01,
|
||||||
|
"steps": 400,
|
||||||
|
"batch": 32,
|
||||||
|
"log_every": 100,
|
||||||
|
"warmup": 300
|
||||||
|
},
|
||||||
|
"eval": {
|
||||||
|
"n": 96
|
||||||
},
|
},
|
||||||
"optim": { "lr": 0.003, "weight_decay": 0.01, "steps": 400, "batch": 32, "log_every": 100 },
|
|
||||||
"eval": { "n": 96 },
|
|
||||||
"out_dir": "out_spatial/floor"
|
"out_dir": "out_spatial/floor"
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,35 @@
|
|||||||
{
|
{
|
||||||
"seed": 0,
|
"seed": 0,
|
||||||
"model": {
|
"model": {
|
||||||
"d": 192, "n_layer": 4, "n_head": 6, "dropout": 0.1, "max_entities": 32,
|
"d": 192,
|
||||||
"rounds": 2, "n_evidence": 4
|
"n_layer": 4,
|
||||||
|
"n_head": 6,
|
||||||
|
"dropout": 0.1,
|
||||||
|
"max_entities": 32,
|
||||||
|
"rounds": 2,
|
||||||
|
"n_evidence": 4
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"train_families": ["dof.set"],
|
"train_families": [
|
||||||
"val_families": ["dof.set"],
|
"dof.set"
|
||||||
"test_families": ["dof.c6"]
|
],
|
||||||
|
"val_families": [
|
||||||
|
"dof.set"
|
||||||
|
],
|
||||||
|
"test_families": [
|
||||||
|
"dof.c6"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"optim": {
|
||||||
|
"lr": 0.003,
|
||||||
|
"weight_decay": 0.01,
|
||||||
|
"steps": 2400,
|
||||||
|
"batch": 32,
|
||||||
|
"log_every": 400,
|
||||||
|
"warmup": 300
|
||||||
|
},
|
||||||
|
"eval": {
|
||||||
|
"n": 192
|
||||||
},
|
},
|
||||||
"optim": { "lr": 0.003, "weight_decay": 0.01, "steps": 2400, "batch": 32, "log_every": 400 },
|
|
||||||
"eval": { "n": 192 },
|
|
||||||
"out_dir": "out_spatial/setonly"
|
"out_dir": "out_spatial/setonly"
|
||||||
}
|
}
|
||||||
+5
-1
@@ -180,7 +180,11 @@ def run(config: dict, resume: bool = False, steps: int = None, verbose: bool = T
|
|||||||
|
|
||||||
total_steps = start + (steps if steps is not None else config["optim"]["steps"])
|
total_steps = start + (steps if steps is not None else config["optim"]["steps"])
|
||||||
base_lr = config["optim"]["lr"]
|
base_lr = config["optim"]["lr"]
|
||||||
warmup = config["optim"].get("warmup", 100)
|
# 100 was a footgun: at lr 3e-3 the first updates are a 10x jump and the
|
||||||
|
# freedom set task never recovered from the basin it landed in. Same lr,
|
||||||
|
# same steps, only this number changed: dof.set 0.203 -> 1.000 on seed 0,
|
||||||
|
# and 3/3 seeds green across all 14 families.
|
||||||
|
warmup = config["optim"].get("warmup", 300)
|
||||||
min_frac = config["optim"].get("min_lr_frac", 0.1)
|
min_frac = config["optim"].get("min_lr_frac", 0.1)
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
for step in range(start, total_steps):
|
for step in range(start, total_steps):
|
||||||
|
|||||||
Reference in new issue
Block a user