mlx-bun library API
    Preparing search index...

    Common admission contract for every runtime. Representation-specific planners may expose richer fields, but serving consumes only this shape.

    interface MemoryPlan {
        allocatorLimitBytes?: number;
        contextTokens: number;
        fits: boolean;
        kvBytes: number;
        machineHeadroomBytes?: number;
        maxGenerationTokens?: number;
        maxSafeContext: number;
        predictedDecodeTps: number | null;
        reserveBytes: number;
        schemaVersion: 1;
        strategy: string;
        streamedWeights?: Readonly<Record<string, number>>;
        totalBytes: number;
        transientBytes: number;
        usableBytes: number;
        weightsBytes: number;
    }

    Hierarchy (View Summary)

    Index
    allocatorLimitBytes?: number

    mlx allocator-cache limit, distinct from the process admission limit.

    contextTokens: number
    fits: boolean
    kvBytes: number
    machineHeadroomBytes?: number

    RAM the plan leaves to the rest of the machine.

    maxGenerationTokens?: number

    Generated-token allowance reserved within contextTokens; absent when the plan reserves none.

    maxSafeContext: number
    predictedDecodeTps: number | null
    reserveBytes: number
    schemaVersion: 1
    strategy: string

    Names the accounting the plan comes from; informational, never branched on.

    streamedWeights?: Readonly<Record<string, number>>

    Parts of weightsBytes held in bounded streaming tiers instead of resident memory, by display label. Resident weights are weightsBytes minus their sum.

    totalBytes: number
    transientBytes: number
    usableBytes: number
    weightsBytes: number