mlx-bun library API
    Preparing search index...
    interface KvFileHeader {
        attachments?: (
            Omit<CheckpointAttachment, "tensors"> & { tensors: TensorSlot[] }
        )[];
        caches: CacheHeaderEntry[];
        codecProvider?: string;
        configFingerprint?: string;
        createdAt: number;
        formatVersion: 3 | 4 | 5;
        generationCheckpoint?: {
            cacheNs: string;
            generatedTokens: number;
            key: string;
            originalPromptTokens: number;
            pendingToken: number;
            seed: number;
            seedWasExplicit: boolean;
        };
        modelId?: string;
        ns?: string;
        tokenizerHash?: string;
        tokens: number[];
    }

    Hierarchy

    Index
    attachments?: (
        Omit<CheckpointAttachment, "tensors"> & { tensors: TensorSlot[] }
    )[]
    codecProvider?: string

    Absent in earlier v3 files, which used mlx-cache-v3.

    configFingerprint?: string

    Caller-supplied store identity, including the model and cache scheme.

    createdAt: number
    formatVersion: 3 | 4 | 5
    generationCheckpoint?: {
        cacheNs: string;
        generatedTokens: number;
        key: string;
        originalPromptTokens: number;
        pendingToken: number;
        seed: number;
        seedWasExplicit: boolean;
    }

    In-flight generation state. The serialized caches cover tokens; pendingToken was sampled from that state but has not been emitted.

    Type Declaration

    • cacheNs: string
    • generatedTokens: number
    • key: string
    • originalPromptTokens: number
    • pendingToken: number
    • seed: number

      Actual sampler seed, including a server-generated default. Required to continue the random stream exactly after a restart.

    • seedWasExplicit: boolean

      True when seed was part of the client request rather than generated by the server.

    modelId?: string
    ns?: string

    Adapter namespace (PromptCache ns — adapters joined with "+").

    tokenizerHash?: string

    sha256 of tokenizer.json: identical ids must mean identical text.

    tokens: number[]