Expand description
GGUF v3 spec-pinned constants.
ADR-060 removed the fixed-width two-level commitment
(GGUF_CANON_MAX_BYTES / GGUF_CANON_BYTES) and the
application-policy capacity profile (GgufHostBounds /
GgufAddrBounds) with its KV-count / tensor-count / string-width /
array-length / tensor-data ceilings. The realization now emits the
full flat canonical skeleton (header + per-KV and per-tensor
records, with variable-length leaves replaced by their streamed
SHA-256 digests) as an unbounded alloc buffer that flows through the
pipeline as a borrowed carrier. Every count and width is unbounded.
What remains are GGUF v3 spec constants (fixed by the format) plus one native-stack-overflow guard on the recursive ARRAY-metadata measurer.
Constants§
- GGUF_
DEFAULT_ ALIGNMENT - Default tensor-data alignment when
general.alignmentis absent. Overridable via that metadata key (must be a power of two ≥ 8). Source:gguf.hGGUF_DEFAULT_ALIGNMENT. - GGUF_
HEADER_ BYTES - Header byte width: magic(4) + version(4) + tensor_count(8) +
kv_count(8). Source:
gguf.md. - GGUF_
MAGIC GGUF_MAGIC— ASCII"GGUF"little-endianu32. Source:gguf.md.- GGUF_
MAX_ DIMS - Maximum tensor rank (
GGML_MAX_DIMS). Source:ggml.h. A GGUF v3 tensor declares at most this many dimensions; this is a format constant, not an application cap. - GGUF_
METADATA_ ARRAY_ DEPTH_ MAX - Native-stack-overflow guard on the recursive ARRAY-of-ARRAY metadata measurer. Guards the call stack against pathologically-nested array metadata; it is not a ceiling on array length or element count.
- GGUF_
VERSION_ REQUIRED - The only GGUF version this realization admits. Source:
gguf.md.