Skip to main content

dequantize_bit4

Function dequantize_bit4 

Source
pub fn dequantize_bit4(
    codes: &[u8],
    factors: Bit4Factors,
    out: &mut [f32],
) -> Result<(), QuantError>
Expand description

Reconstructs the norm-scaled selected four-bit code direction.

The result is ||v|| * y / ||y||. Serving uses est_dot_bit4 directly; reconstruction exists to specify and verify the codec’s geometric error.

§Errors

Returns the code-length and padding errors documented by est_dot_bit4. The output length defines the logical dimension of the final partial byte.