Skip to main content

encode_int4_embeddings

Function encode_int4_embeddings 

Source
pub fn encode_int4_embeddings(
    embeddings: &[f32],
    n: usize,
    dim: usize,
) -> Result<Vec<u8>>
Expand description

Encode the int4 embeddings section payload. embeddings is n * dim row-major f32; dim must be divisible by INT4_BLOCK.