@@ -61,14 +61,6 @@ class MOSO(opt_mixin.WeightDecayMixin, optim.Optimizer):
6161 shampoo_beta: EMA coefficient for the one-sided momentum covariance.
6262 eps: Inner Adam epsilon for numerical stability.
6363 weight_decay: Weight decay coefficient.
64- weight_decay_method: Method to apply weight decay, see :class:`~emerging_optimizers.mixin.WeightDecayMixin`.
65- nesterov: Whether to use Nesterov momentum.
66- correct_bias: Whether to use bias correction in the inner Adam update.
67- correct_shampoo_beta_bias: Whether to bias-correct the covariance EMA.
68- fp32_matmul_prec: Precision of the matmul operations in optimizer state GEMMs.
69- use_eigh: Whether to use full symmetric eigendecomposition for eigenbasis updates after the first step.
70- qr_fp32_matmul_prec: Precision of the matmul operations in QR decomposition.
71- power_iter_steps: Number of power iteration steps to perform before QR decomposition.
7264 scale_mode: Muon update scale mode.
7365 extra_scale_factor: Additional update scale factor.
7466 max_update_rms: Clip the update RMS to this value (0 means no clipping).
@@ -84,26 +76,18 @@ def __init__(
8476 eps : float = 1e-8 ,
8577 weight_decay : float = 0.01 ,
8678 * ,
87- weight_decay_method : opt_mixin .WeightDecayT = "decoupled" ,
88- nesterov : bool = False ,
89- correct_bias : bool = True ,
90- correct_shampoo_beta_bias : bool = True ,
91- fp32_matmul_prec : FP32MatmulPrecT = "highest" ,
92- use_eigh : bool = False ,
93- qr_fp32_matmul_prec : FP32MatmulPrecT = "high" ,
94- power_iter_steps : int = 1 ,
9579 scale_mode : MuonScaleT = "spectral" ,
9680 extra_scale_factor : float = 1.0 ,
9781 max_update_rms : float = 0.0 ,
9882 ) -> None :
99- self .nesterov = nesterov
100- self .correct_bias = correct_bias
101- self .weight_decay_method = weight_decay_method
102- self .correct_shampoo_beta_bias = correct_shampoo_beta_bias
103- self .fp32_matmul_prec = fp32_matmul_prec
104- self .use_eigh = use_eigh
105- self .qr_fp32_matmul_prec = qr_fp32_matmul_prec
106- self .power_iter_steps = power_iter_steps
83+ self .nesterov = False
84+ self .correct_bias = True
85+ self .weight_decay_method = "decoupled"
86+ self .correct_shampoo_beta_bias = True
87+ self .fp32_matmul_prec : FP32MatmulPrecT = "highest"
88+ self .use_eigh = False
89+ self .qr_fp32_matmul_prec : FP32MatmulPrecT = "highest"
90+ self .power_iter_steps = 1
10791 self .scale_mode = scale_mode
10892 self .extra_scale_factor = extra_scale_factor
10993 self .max_update_rms = max_update_rms
0 commit comments