Skip to content

A TTS that fits in your CPU (and pocket)

Python

Training: Muon as the default optimizer (#416)

manu-lm0d2010682f3e
diff --git a/training/args.py b/training/args.py
index d4d16a0..e7252a0 100644
--- a/training/args.py
+++ b/training/args.py
@@ -65,12 +65,12 @@ class OptimArgs:
# a cosine fine-tune.
schedule: str = "constant"
lr_min_ratio: float = 0.0
- # "adamw", or "muon": Newton-Schulz orthogonalized momentum on the backbone's 2D
- # weights (the fused q/k/v projection orthogonalized as three blocks), AdamW on
- # everything else. muon_lr is the Muon step size; the AdamW groups keep `lr`, and
- # the schedule applies to both. muon_head also puts the sampler head's 2D weights
- # under Muon (useful for head-only fine-tunes).
- type: str = "adamw"
+ # "muon" (default), or "adamw". Muon: Newton-Schulz orthogonalized momentum on
+ # the backbone's 2D weights (the fused q/k/v projection orthogonalized as three
+ # blocks), AdamW on everything else. muon_lr is the Muon step size; the AdamW
+ # groups keep `lr`, and the schedule applies to both. muon_head also puts the
+ # sampler head's 2D weights under Muon (useful for head-only fine-tunes).
+ type: str = "muon"
muon_lr: float = 0.005
muon_momentum: float = 0.95
muon_head: bool = False
diff --git a/training/configs/finetune.yaml b/training/configs/finetune.yaml
index 524c9da..afca312 100644
--- a/training/configs/finetune.yaml
+++ b/training/configs/finetune.yaml
@@ -21,6 +21,7 @@ voice_dropout: 0.2
optim:
lr: 2e-5 # a tenth of the scratch rate: the model already speaks this language
+ muon_lr: 5e-4 # a tenth of the default Muon rate, for the same reason
schedule: constant
warmup_steps: 1000