import { GPTConfig, LoRAConfig } from './models/config';
import { Conversation, ITokeniser } from './tokeniser/type';
import { SaveOptions } from './loader/save';
import { LoadModelOptions } from './loader/load';
import { IGenerateOptions, IGenerator } from './Generator';
import { default as Trainer, TrainingType } from './Trainer';
import { default as MemoryProfiler } from './utilities/profile';
import { default as Model, ModelForwardAttributes } from './models/model';
import { Task } from './training/tasks/Task';
import { TrainingLogEntry, TrainingOptions } from './training/types';
import { ModelPhase, TransformersMetadata } from './loader/types';
type TeachableLLMStatus = 'warmup' | 'awaitingTokens' | 'ready' | 'training' | 'loading' | 'busy' | 'error';
export default class TeachableLLM {
    private ee;
    private _config?;
    private _model?;
    private _tokeniser?;
    private _status;
    private _memoryRequirements?;
    meta: TransformersMetadata;
    private _trainer;
    constructor(tokeniser?: ITokeniser, model?: Model<ModelForwardAttributes, GPTConfig>);
    get currentTrainer(): Trainer | null;
    get vocab(): string[];
    get phase(): ModelPhase;
    set phase(phase: ModelPhase);
    /** Model is fully loaded */
    get loaded(): boolean;
    get config(): GPTConfig;
    get model(): Model<ModelForwardAttributes, GPTConfig>;
    get tokeniser(): ITokeniser;
    get status(): TeachableLLMStatus;
    /** Model is both ready and not busy */
    get ready(): boolean;
    get busy(): boolean;
    createLoRA(name: string, loraConfig: LoRAConfig): void;
    deleteLoRA(name: string): void;
    renameLoRA(oldName: string, newName: string): void;
    attachLoRA(name: string): void;
    detachLoRA(): void;
    hasLoRA(name?: string): boolean;
    listLoRAs(): string[];
    estimateTrainingMemoryUsage(batchSize: number): number;
    private setStatus;
    saveModel(options?: SaveOptions): Promise<Blob>;
    static loadModel(data: Blob | Buffer | string, options?: LoadModelOptions): TeachableLLM;
    static create(tokeniserType: 'char' | 'bpe', config: GPTConfig): TeachableLLM;
    getProfiler(): MemoryProfiler | undefined;
    get enableProfiler(): boolean;
    set enableProfiler(value: boolean);
    getNumParams(): number;
    trainer(trainingType?: TrainingType, options?: TrainingOptions): Trainer;
    train(text: Task[], options?: TrainingOptions, trainingType?: TrainingType): Promise<void>;
    trainTokeniser(text: Conversation[][]): Promise<number>;
    generator(): IGenerator;
    generateText(prompt: Conversation[], options?: IGenerateOptions): Promise<Conversation[]>;
    generateText(options?: IGenerateOptions): Promise<Conversation[]>;
    dispose(): void;
    on(event: 'status', listener: (status: TeachableLLMStatus) => void): void;
    on(event: 'phase', listener: (phase: ModelPhase) => void): void;
    on(event: 'error', listener: (error: Error) => void): void;
    on(event: 'trainStep', listener: (step: TrainingLogEntry) => void): void;
    on(event: 'loaded' | 'changeLoRA', listener: () => void): void;
    off(event: 'status', listener: (status: TeachableLLMStatus) => void): void;
    off(event: 'phase', listener: (phase: ModelPhase) => void): void;
    off(event: 'error', listener: (error: Error) => void): void;
    off(event: 'trainStep', listener: (step: TrainingLogEntry) => void): void;
    off(event: 'loaded' | 'changeLoRA', listener: () => void): void;
}
export {};
