mlx_rs

Module macros

Source
Expand description

Macros for mlx-rs.

Derive Macrosยง

  • Derive the ModuleParameters trait for a struct. Mark a field with #[param] attribute to include it in the parameters. The field type must implement the mlx_rs::module::Parameter trait.
  • Derive the Quantizable trait for a struct. Mark a field with #[quantizable] attribute to include it in the quantization process. Only support types M that M::Quantized = Self