/** * Model and Manifest Types * Types for model storage, manifests, and GGUF format */ export declare const MEDIA_TYPES: { readonly MODEL: "application/vnd.ollama.image.model"; readonly PROJECTOR: "application/vnd.ollama.image.projector"; readonly ADAPTER: "application/vnd.ollama.image.adapter"; readonly TEMPLATE: "application/vnd.ollama.image.template"; readonly PARAMS: "application/vnd.ollama.image.params"; readonly SYSTEM: "application/vnd.ollama.image.system"; readonly LICENSE: "application/vnd.ollama.image.license"; readonly MESSAGES: "application/vnd.ollama.image.messages"; }; export type MediaType = (typeof MEDIA_TYPES)[keyof typeof MEDIA_TYPES]; export interface ManifestLayer { mediaType: string; digest: string; size?: number; } export interface ManifestConfig { digest: string; size?: number; } export interface ModelManifest { schemaVersion?: number; mediaType?: string; config: ManifestConfig; layers: ManifestLayer[]; } export interface ModelName { registry: string; namespace: string; model: string; tag: string; } export interface ModelInfo { name: string; digest: string; size: number; modifiedAt: Date; manifest: ModelManifest; modelPath: string; } export declare enum GGUFValueType { UINT8 = 0, INT8 = 1, UINT16 = 2, INT16 = 3, UINT32 = 4, INT32 = 5, FLOAT32 = 6, BOOL = 7, STRING = 8, ARRAY = 9, UINT64 = 10, INT64 = 11, FLOAT64 = 12 } export declare enum GGMLType { F32 = 0, F16 = 1, Q4_0 = 2, Q4_1 = 3, Q5_0 = 6, Q5_1 = 7, Q8_0 = 8, Q8_1 = 9, Q2_K = 10, Q3_K = 11, Q4_K = 12, Q5_K = 13, Q6_K = 14, Q8_K = 15, IQ2_XXS = 16, IQ2_XS = 17, IQ3_XXS = 18, IQ1_S = 19, IQ4_NL = 20, IQ3_S = 21, IQ2_S = 22, IQ4_XS = 23, I8 = 24, I16 = 25, I32 = 26, I64 = 27, F64 = 28, BF16 = 30 } export interface GGUFHeader { magic: number; version: number; tensorCount: bigint; metadataKVCount: bigint; } export interface GGUFMetadata { [key: string]: unknown; } export interface GGUFTensorInfo { name: string; nDimensions: number; dimensions: bigint[]; type: GGMLType; offset: bigint; } export interface GGUFFile { header: GGUFHeader; metadata: GGUFMetadata; tensors: GGUFTensorInfo[]; tensorDataOffset: bigint; } export declare const GGUF_KEYS: { readonly GENERAL_ARCHITECTURE: "general.architecture"; readonly GENERAL_NAME: "general.name"; readonly GENERAL_AUTHOR: "general.author"; readonly GENERAL_VERSION: "general.version"; readonly GENERAL_DESCRIPTION: "general.description"; readonly GENERAL_FILE_TYPE: "general.file_type"; readonly GENERAL_QUANTIZATION_VERSION: "general.quantization_version"; readonly CONTEXT_LENGTH: ".context_length"; readonly EMBEDDING_LENGTH: ".embedding_length"; readonly BLOCK_COUNT: ".block_count"; readonly FEED_FORWARD_LENGTH: ".feed_forward_length"; readonly ATTENTION_HEAD_COUNT: ".attention.head_count"; readonly ATTENTION_HEAD_COUNT_KV: ".attention.head_count_kv"; readonly TOKENIZER_MODEL: "tokenizer.ggml.model"; readonly TOKENIZER_LIST: "tokenizer.ggml.tokens"; readonly TOKENIZER_TOKEN_TYPE: "tokenizer.ggml.token_type"; readonly TOKENIZER_SCORES: "tokenizer.ggml.scores"; readonly TOKENIZER_MERGES: "tokenizer.ggml.merges"; readonly TOKENIZER_BOS_ID: "tokenizer.ggml.bos_token_id"; readonly TOKENIZER_EOS_ID: "tokenizer.ggml.eos_token_id"; readonly TOKENIZER_PAD_ID: "tokenizer.ggml.padding_token_id"; readonly TOKENIZER_UNK_ID: "tokenizer.ggml.unknown_token_id"; readonly CHAT_TEMPLATE: "tokenizer.chat_template"; }; export interface ModelArchitecture { architecture: string; name?: string; contextLength: number; embeddingLength: number; blockCount: number; headCount: number; headCountKV: number; vocabSize: number; quantization: string; } export declare function parseModelName(name: string): ModelName; export declare function formatModelName(name: ModelName, includeTag?: boolean): string; //# sourceMappingURL=model.d.ts.map