mlx-bun library API
    Preparing search index...

    Prepared native input with an indivisible prefill. The preparation owner retains its tensors; the graph's binding returns an owned final hidden row. Decode, sampling and row retirement use the ordinary execution group.

    interface MlxPromptInput {
        decodeState?: MlxDecodeState;
        prefill(
            ids: MlxArray,
            caches: Cache[],
            start: number,
            phase: "tail" | "decode",
            width: number,
        ): MlxArray;
    }
    Index
    decodeState?: MlxDecodeState
    • The vision prefill phase: one sequence's prompt from position start, the prepared embeddings at 0 and its token ids after a reused prefix, at the request's positions. phase and width are the scheduler's: the planner's name for the piece (one position after a reused prefix appends as a decode, more as a tail) and the class of its rows. Returns the hidden of the prompt's last position.

      Parameters

      • ids: MlxArray
      • caches: Cache[]
      • start: number
      • phase: "tail" | "decode"
      • width: number

      Returns MlxArray