dequant_4bit_block_to_bf16

Function dequant_4bit_block_to_bf16 

Source
pub fn dequant_4bit_block_to_bf16(
    raw: &[u8],
    bs: usize,
    nkv: usize,
    hd: usize,
    lut: &[f32; 16],
    out: &mut [bf16],
)
Expand description

2026-09-25: A 4-bit block (NVFP4 or Turbo4, chosen by lut) to BF16.

Layout per block: data: bs * nkv * (hd / 2) bytes, low nibble first. scales: bs * nkv * (hd / NVFP4_GROUP_SIZE) bytes, one FP8 scale per group.