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

    Known tokens: one sequence's tokens are its rows, so the one-row operation is one token.

    config: ModelConfig
    dsaBenchmarkPrefillTokens: number
    dsaPrefillMode: "exact" | "dense-benchmark"
    expertBackend: Glm52ExpertExecutionBackend | null
    expertRuntime: Glm52ExpertRuntime | null
    finalNorm: MlxArray
    glmConfig: Glm52Config
    loraState: LoraState = ...
    multiSequencePrompt: readonly MlxPromptRange[]
    multiSequencePromptChunk: readonly MlxPromptRange[]
    pilot: Glm52PilotTracker | null
    prefixBase: "model"
    prompt: readonly MlxPromptRange[]
    promptChunk: readonly MlxPromptRange[]

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

    A verify window on the row-independent M=1 streamed-expert kernel family (setFixedKernelFamily), so a token's experts take the same kernels whatever rows verify beside it. Composed into the operation: the scheduler never pins or unpins it.

    weightsBytes: number
    • get cacheLayers(): readonly MlxCacheLayer[]

      One latent attention cache per layer, the lego the composition's KV scheme and paging name for it (composedLatentCache): f32 by default, the latent, RoPE key and (on a DSA layer) index key encoded f32-first under a quantized scheme, in pages under paging.

      Returns readonly MlxCacheLayer[]

    • 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

    • The decoder over embeddings (borrowed). cache holds one latent attention cache per layer (makeCache), which each layer's MLA block reads through the read it was built with, attending as the calling phase's reads name.

      Parameters

      Returns MlxArray

    • Attach probe-only telemetry for selections computed by FULL DSA layers.

      Parameters

      • observer: Glm52DsaSelectionObserver | null

      Returns void