mlx-bun library API
    Preparing search index...

    The adapters operation: LoRA adapters mounted on the model's own weights. Every call runs under the model's execution lease, in the process that holds the model (a worker, when the host isolates its models), never in the host's.

    interface AdapterOperation {
        list(signal?: AbortSignal): Promise<readonly MountedAdapter[]>;
        merge(
            request: {
                adapters: readonly [string, string];
                output: string;
                scales?: readonly number[];
            },
            signal?: AbortSignal,
        ): Promise<Readonly<Record<string, unknown>>>;
        mount(
            id: string,
            directory: string,
            signal?: AbortSignal,
        ): Promise<MountedAdapter>;
        unmount(id: string, signal?: AbortSignal): Promise<number>;
    }
    Index
    • Combines two adapter directories, each scaled, into a new adapter directory.

      Parameters

      • request: {
            adapters: readonly [string, string];
            output: string;
            scales?: readonly number[];
        }
      • Optionalsignal: AbortSignal

      Returns Promise<Readonly<Record<string, unknown>>>

    • Removes a mounted adapter; resolves to the layers it was mounted on, 0 when id was not mounted.

      Parameters

      • id: string
      • Optionalsignal: AbortSignal

      Returns Promise<number>