Expand description
Safetensor model loader — native zero-copy adoption of Safetensors models (including BF16).
Maps Hugging Face safetensors format (model.layers.N..., lm_head, model.embed_tokens)
and GGUF-named safetensors into canonical GgufTensorIndex references without transcoding.
Supports BF16 (GGML 30), F16 (GGML 1), and F32 (GGML 0).
Structs§
- Model
Json Config - Safetensor
Nvfp4 Matrix - Zero-copy view of one NVFP4-quantized matrix inside a Safetensors mmap (
U8packed nibbles +F8_E4M3block scales +f32global scale).
Constants§
- GGML_
TYPE_ NVFP4_ PACKED - GGML synthetic type tag for packed NVFP4 (
U8weight bytes paired withF8_E4M3.weight_scaleandF32.weight_scale_2).
Functions§
- parse_
safetensor_ to_ index - Parse a safetensor mmap and build a canonical
GgufTensorIndex. - resolve_
nvfp4_ matrix - Resolve an NVFP4 matrix triplet (
{prefix}.weight,{prefix}.weight_scale,{prefix}.weight_scale_2) from a Safetensors mmap.