Module dequant_cpu

Module dequant_cpu 

Source
Expand description

Public for kernel oracles: the CPU reference decoders every GPU dequant is held to. CPU reference dequantization for GGUF/GGML quantized weight blocks.

This is the correctness oracle and portable fallback for the Atlas GGUF loader. Every routine reproduces llama.cpp’s dequantize_row_* index arithmetic exactly (little-endian throughout). Clarity is preferred over speed: the GPU dequant kernels are the fast path; these functions are what those kernels are validated against, and what runs when a ggml type has no GPU kernel or under MockGpuBackend unit tests (which do not execute kernels).

Enums§

GgmlType
A GGML block-quantization type.

Functions§

dequant_to_bf16
Dequantize into BF16 bit patterns (round-to-nearest-even), the form the GGUF loader hands to WeightTensor { dtype: BF16 }. Goes via f32 for a single, obviously-correct code path.
dequant_to_f32
Dequantize n_elements from packed block_bytes into out as f32.