fix: fine-tune config and generator improvements
scripts/train.py: fix max_seq_len 256→320 (must match pretrained checkpoint); increase epochs 15→50 and patience 5→10 to give the small corpus enough gradient steps; reduce warmup 20→10 (was 22% of total steps). scripts/generate.py: default to prepending the tonic chord when --prefix is not given; add --no-tonic-anchor to opt out. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -54,13 +54,17 @@ TRAIN_CFG = TrainConfig(
|
||||
data_dir=DATA_DIR,
|
||||
output=CHECKPOINT,
|
||||
init_from=INIT_FROM,
|
||||
epochs=15,
|
||||
# Small corpus (~45 train files) → ~6 batches/epoch.
|
||||
# 50 epochs × 6 = ~300 gradient steps; patience=10 gives a 60-step window.
|
||||
epochs=50,
|
||||
batch_size=8,
|
||||
lr=1e-5,
|
||||
warmup_steps=20,
|
||||
warmup_steps=10,
|
||||
patience=10,
|
||||
seed=42,
|
||||
device="auto",
|
||||
max_seq_len=256,
|
||||
# Must match pretrained checkpoint (max_seq_len=320).
|
||||
max_seq_len=320,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user