Skip to main content

fsq_dequantize

Function fsq_dequantize 

Source
pub fn fsq_dequantize(
    tokens: &[u16],
    levels: &[u16],
    lo: f32,
    hi: f32,
    out: &mut [f32],
) -> Result<(), AudioError>
Expand description

Reconstruct latent components from FSQ level indices: out[d] = lo + tokens[d]·step_d.

  • tokens: at least dim level indices (each clamped into 0..L_d).
  • levels, lo, hi: same as fsq_quantize.
  • out: at least dim floats; fully overwritten.

§Errors