oa::ml::matrix::vq_ema_update

Produce the next VQ EMA state without mutating input Matrix values. This preserves the donor update equations, optional unit-RMS codebook normalization, and exact dead-code revival hash. The owning module installs the returned values into its stable persistent buffer handles. Errors Returns an error for incompatible shapes, dtypes, engines, invalid numerical options, ABI overflow, allocation failure, or runtime recording failure.

FnRust public API

Function Documentation

pub fn vq_ema_update( latent: &Matrix, indices: &Matrix, embed_sum: &Matrix, cluster_size: &Matrix, codebook: &Matrix, decay: f32, epsilon: f32, dead_threshold: f32, seed: u32, normalize: bool ) -> Result<VqEmaState>
Produce the next VQ EMA state without mutating input Matrix values. This preserves the donor update equations, optional unit-RMS codebook normalization, and exact dead-code revival hash. The owning module installs the returned values into its stable persistent buffer handles. Errors Returns an error for incompatible shapes, dtypes, engines, invalid numerical options, ABI overflow, allocation failure, or runtime recording failure.