GgufTensorInfo

Models & Types · AiDotNet.Agentic.Models.Local

A tensor directory entry in a GGUF file: its name, dimensions, ggml data type, and byte offset within the tensor-data section.

For Beginners

GGUF (the llama.cpp weight format) lists every weight array with its shape, numeric type, and where its bytes start. This is one such listing.

Constructors

Constructor Summary
GgufTensorInfo(string name, IReadOnlyList<long> dimensions, uint ggmlType, ulong offset) Initializes a new tensor info.

Properties

Property Summary
IReadOnlyList<long> Dimensions { get; } Gets the tensor dimensions.
long ElementCount { get; } Gets the total element count (product of Dimensions; validated at construction).
string Name { get; } Gets the tensor name.
uint GgmlType { get; } Gets the ggml type code (0 = F32, 1 = F16, higher = quantized formats).
ulong Offset { get; } Gets the byte offset of the tensor within the data section.

Fields

Field Summary
int QuantBlockSize The number of values per quantization block (ggml QK).
int SuperBlockSize The number of values per k-quant super-block (ggml QK_K).
uint TypeF16 The ggml type code for 16-bit float tensors.
uint TypeF32 The ggml type code for 32-bit float tensors.
uint TypeQ4_0 The ggml type code for Q4_0 quantization (32-value blocks, 4-bit, single scale).
uint TypeQ4_1 The ggml type code for Q4_1 quantization (32-value blocks, 4-bit, scale + min).
uint TypeQ4_K The ggml type code for Q4_K quantization (256-value super-blocks, 4-bit, 8 sub-scales/mins).
uint TypeQ6_K The ggml type code for Q6_K quantization (256-value super-blocks, 6-bit, 16 sub-scales).
uint TypeQ8_0 The ggml type code for Q8_0 quantization (32-value blocks, 8-bit, single scale).