pub struct Muon {
pub learning_rate: LearningRate,
pub momentum: f64,
pub weight_decay: f64,
pub nesterov: bool,
pub ns_steps: usize,
/* private fields */
}Expand description
Muon, as MLX’s optimizers.Muon: momentum (Nesterov by default) whose update is
orthogonalised by Newton–Schulz iterations for parameters of two or more dimensions.
Fields§
§learning_rate: LearningRateThe learning rate.
momentum: f64The momentum (MLX’s default 0.95).
weight_decay: f64Weight decay added to the gradient (MLX’s default 0.01).
nesterov: boolNesterov momentum (MLX’s default).
ns_steps: usizeNewton–Schulz iterations (MLX’s default 5).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Muon
impl !UnwindSafe for Muon
impl Freeze for Muon
impl Send for Muon
impl Sync for Muon
impl Unpin for Muon
impl UnsafeUnpin for Muon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more