Skip to main content

trapezoidal_coefficients

Function trapezoidal_coefficients 

Source
pub fn trapezoidal_coefficients<const D: usize>(
    dd_dt: Tensor<D>,
    dd_a_raw: Tensor<D>,
    lambda_raw: Tensor<D>,
    dt_bias_h: Tensor<1>,
    dt_limit: (f64, f64),
    a_floor: f64,
) -> TrapezoidCoeffs<D>
Expand description

Compute the trapezoidal discretisation coefficients from the raw (data-dependent) projections. See the top-of-mamba3.rs docs for the formulas.

All four data tensors share rank D and have nheads as the last dim. dt_bias_h is broadcast to match.