mlx-bun library API
    Preparing search index...

    The graph's operations and construction facts. Pooled embedding support is declared by its operation alone. Other operations accompany the promises in graphCapabilities; composition checks their pairing when it binds (declaredGraph).

    Implements

    Index
    appendKnown: MlxKnownOperations
    cacheLayers: readonly MlxCacheLayer[]
    config: ModelConfig

    Unscaled token embeddings, for media prompts that splice embeddings.

    embedScale: number
    finalNorm: RMSNorm
    graphCapabilities: GraphDeclaration = ...
    layers: readonly GemmaInputLayer[]
    loraState: LoraState = ...
    makeCache: () => Cache[]
    mediaPrefill: readonly {
        from: number;
        operation: (
            embeds: MlxArray,
            caches: Cache[],
            bidir: MlxArray | null,
            ids: MlxArray,
            multimodal: MlxArray | null,
        ) => MlxArray;
        to: number;
    }[] = ...
    mixed: readonly MlxMixedRange[]

    Mixed rows in one forward, declared by a composition that serves them.

    mixedSeparate: Readonly<
        {
            decode: readonly {
                from: number;
                operation: (group: MlxPhaseGroup) => MlxArray;
                to: number;
            }[];
            verify: readonly {
                from: number;
                operation: (group: MlxPhaseGroup) => MlxArray;
                to: number;
            }[];
            window: readonly {
                from: number;
                operation: (group: MlxPhaseGroup) => MlxArray;
                to: number;
            }[];
        },
    > = ...

    Mixed groups that retain their own projection geometry. The scheduler routes each group independently when a verify group is present.

    multiSequencePrompt: readonly MlxPromptRange[]
    multiSequencePromptChunk: readonly MlxPromptRange[]
    numDonors: 24 = CACHES
    perLayerWidth: number
    prefixBase: "language_model.model" = PREFIX
    prompt: readonly MlxPromptRange[]
    promptChunk: readonly MlxPromptRange[]

    Optional chunk bindings when a file distinguishes chunks from prompt tails.

    sequence: readonly {
        from: number;
        operation: (ids: MlxArray, caches: Cache[]) => MlxArray;
        to: number;
    }[] = ...

    Full-sequence scoring operations, indexed by total token rows.

    traceLayers: readonly GemmaInputLayer[]
    weightsBytes: number
    windowSize: number
    • Release what the graph built at construction (computed constants, Neural Engine programs, its own weight source where it opened one) once every execution and compiled runner has stopped. A graph that built nothing releases nothing. Its owner (the host, a draft provider) calls it before releasing the weights it supplied.

      Returns void