Type Alias: GgufFileInfo
type GgufFileInfo = {
version: 2 | 3 | number;
tensorCount: number | bigint;
metadata: GgufMetadata;
metadataSize: number;
infoEndOffset?: number;
architectureMetadata: MergeOptionalUnionTypes<Exclude<GgufMetadata[GgufArchitectureType], undefined>>;
tensorInfo?: GgufTensorInfo[];
tensorInfoSize?: number;
splicedParts: number;
totalTensorCount: number | bigint;
totalMetadataSize: number;
fullTensorInfo?: GgufTensorInfo[];
totalTensorInfoSize?: number;
sourceData: GgufFileInfoSourceData[];
source?: GgufFileInfoSource;
};Defined in: gguf/types/GgufFileInfoTypes.ts:13
Properties
version
readonly version: 2 | 3 | number;Defined in: gguf/types/GgufFileInfoTypes.ts:14
tensorCount
readonly tensorCount: number | bigint;Defined in: gguf/types/GgufFileInfoTypes.ts:15
metadata
readonly metadata: GgufMetadata;Defined in: gguf/types/GgufFileInfoTypes.ts:16
metadataSize
readonly metadataSize: number;Defined in: gguf/types/GgufFileInfoTypes.ts:17
infoEndOffset?
readonly optional infoEndOffset: number;Defined in: gguf/types/GgufFileInfoTypes.ts:24
Offset in bytes from the start of the file to the end of the preserved GGUF info section. This includes the header, key-value metadata, tensor info and the alignment padding up to the tensor data section. Can be null if readTensorInfo is set to false.
architectureMetadata
readonly architectureMetadata: MergeOptionalUnionTypes<Exclude<GgufMetadata[GgufArchitectureType], undefined>>;Defined in: gguf/types/GgufFileInfoTypes.ts:27
Same value as metadata[metadata.general.architecture], but with merged types for convenience
tensorInfo?
readonly optional tensorInfo: GgufTensorInfo[];Defined in: gguf/types/GgufFileInfoTypes.ts:30
can be null if readTensorInfo is set to false
tensorInfoSize?
readonly optional tensorInfoSize: number;Defined in: gguf/types/GgufFileInfoTypes.ts:33
can be null if readTensorInfo is set to false
splicedParts
readonly splicedParts: number;Defined in: gguf/types/GgufFileInfoTypes.ts:41
For spliced metadata of multiple file parts, this will be the number of files parts read and spliced into this metadata.
Whe no splicing is done, this will be 1.
totalTensorCount
readonly totalTensorCount: number | bigint;Defined in: gguf/types/GgufFileInfoTypes.ts:48
For spliced metadata of multiple file parts, this will be the total tensor count from all the parts
When no splicing is done, this will be the same as tensorCount.
totalMetadataSize
readonly totalMetadataSize: number;Defined in: gguf/types/GgufFileInfoTypes.ts:55
For spliced metadata of multiple file parts, this will be the total metadata size from all the parts
When no splicing is done, this will be the same as metadataSize.
fullTensorInfo?
readonly optional fullTensorInfo: GgufTensorInfo[];Defined in: gguf/types/GgufFileInfoTypes.ts:63
For spliced metadata of multiple file parts, this will be the spliced tensorInfo from all the parts. Can be null if readTensorInfo is set to false
When no splicing is done, this will be the same as tensorInfo.
totalTensorInfoSize?
readonly optional totalTensorInfoSize: number;Defined in: gguf/types/GgufFileInfoTypes.ts:70
For spliced metadata of multiple file parts, this will be the total tensor info size from all the parts
When no splicing is done, this will be the same as tensorInfoSize.
sourceData
readonly sourceData: GgufFileInfoSourceData[];Defined in: gguf/types/GgufFileInfoTypes.ts:82
An array of source data entries from which the file info was read. Each entry can be either a file path or a read-only buffer containing the raw GGUF metadata section part of the file (including the header, key-value pairs, tensor info and alignment padding up to the tensor data section).
For a single source file, this array will contain only a single entry, but for spliced metadata from multiple file parts, this array will contain an entry for each part, in the order they were spliced.
When readTensorInfo is set to false, this will be an empty array.
source?
readonly optional source: GgufFileInfoSource;Defined in: gguf/types/GgufFileInfoTypes.ts:87
Indication of the source of the GGUF file info, such as the file path or URI it was read from.