Skip to main content

repack_q4_0

Function repack_q4_0 

Source
pub fn repack_q4_0(data: &[u8]) -> Result<(Vec<u32>, Vec<f32>)>
Expand description

Layout step: repack a raw GGUF Q4_0 block stream into the device layout the kernels consume — nibble bytes as little-endian u32 words (4 words per block) and one f32 scale per block. The f16→f32 scale conversion is exact, so no precision is lost relative to the reference.