mlx-bun library API
    Preparing search index...

    Interface ModelImplementation<Source, Model, Composed>

    Engine code implements this port. Source and Model remain backend-specific; selection introduces no tensor conversion or dispatch in the token loop. create borrows source; a failed construction must release its own resources. composition is the record the loader resolved; a graph registry receives a Composition. A complete implementation that owns its loader takes void and composes itself from its source.

    interface ModelImplementation<Source, Model, Composed = Composition> {
        graph: string;
        id: string;
        loader: ModelLoader;
        loop: GenerationLoop;
        create(
            source: Source,
            config: ModelConfig,
            profile: ResolvedModelProfile,
            composition: Composed,
        ): Model;
    }

    Type Parameters

    Index
    graph: string
    id: string
    loader: ModelLoader