Skip to main content

Crate zsfm_gguf

Crate zsfm_gguf 

Source

Macros§

tensor_map
Table-driven exact match with a fallback closure for prefix/layer rules.

Structs§

GGUFFile
GGUFTensorInfo
GGUFWriter
Streaming GGUF v3 writer.

Enums§

GGMLType
GGML tensor data types used in GGUF files. Values match the ggml_type enum in ggml.h.
GGUFMetaValue
A typed metadata value for a GGUF key-value pair.
GGUFValueType
GGUF metadata value types (gguf_metadata_value_type).

Constants§

MAX_KV_COUNT
Hard caps so a corrupt header cannot trigger huge allocations.
MAX_N_DIMS
MAX_STRING_LEN
MAX_TENSOR_BYTES
MAX_TENSOR_COUNT
READ_BUF_CAPACITY
Capacity every model crate should wrap its BufReader<File> with before parsing a GGUF file. Header/metadata parsing is hundreds to thousands of few-byte read_u32/read_u64 calls (one per tensor dim, name length, metadata value, …); the default 8 KiB BufReader capacity is fine for small files but forces a syscall every few tensors on models with hundreds of them. 1 MiB comfortably covers any GGUF header in one underlying read while staying small relative to the model file itself.

Functions§

map_with_table
Exact-match helper for tensor_map.rs files.