Skip to main content

muon_update

Function muon_update 

Source
pub fn muon_update<T: Triton, const BLOCK_SIZE: i32>(
    params_ptr: T::Pointer<f32>,
    grad_ptr: T::Pointer<f32>,
    n_elements: i32,
    lr: f32,
)
where T::I32Tensor: Tensor<i32, 1> + Comparison<i32, BoolTensor = T::BoolTensor>, T::Pointer<f32>: AddOffsets<i32, 1, T::I32Tensor, Output = T::Tensor<T::Pointer<f32>>>,
Expand description

Parameter update: W -= lr · G_orth.

Grid: [ceil(n_elements / BLOCK_SIZE), 1, 1].