Skip to main content

Module cast

Module cast 

Source
Expand description

Canonical dtype casting for GGUF conversion: {F32, F16, BF16} sources to any writable GGMLType, including Q8_0 block quantization. Bit-for-bit the same math as the per-model converters (which predate this crate and keep their own verified copies).

Enums§

SrcDtype
Source dtype of raw checkpoint tensor bytes.

Functions§

cast_data
Cast raw little-endian tensor bytes from src to dst.
decode_to_f32
Decode raw bytes of src dtype into f32 values (exact for all three sources).
f16_to_f32
f32_to_bytes
f32_to_f16_bits
quantize_q8_0