Component evidence

GGUF File Format API (include/gguf.h)

ggerganov/llama.cpp · ggml/include/gguf.h · c · MIT
filestag:gguftag:ggmltag:model-formattag:binarytag:serialization

Defines the GGUF binary model-file format, including metadata, tensor descriptors, and initialization parameters. Reuse it when reading, writing, or integrating GGUF files with ggml-based applications.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/ggml-org/llama.cpp | License: MIT | Copyright 2023-2026 The ggml authors
// Provided via justclaw.it.com; keep this notice with the code.
// This file contains functionality related to "GGUF" files, the binary file format used by ggml.
// GGUF files have the following structure:
//
// 1. File magic "GGUF" (4 bytes).
// 2. File version (uint32_t).
// 3. Number of ggml tensors in file (int64_t).
// 4. Number of key-value-pairs in file (int64_t).
// 5. For each KV pair:
//   1. The key (string).
//   2. The value type (gguf_type).
//   3a. If the value type is GGUF_TYPE_ARRAY:
//     1. The type of the array (gguf_type).
//     2. The number of elements in the array (uint64_t).
//     3. The binary representation of each element in the array.
//   3b. Otherwise:


... (truncated -- full source via MCP)