import { ITokeniser } from './tokeniser/type';
import { default as EE } from 'eventemitter3';
import { default as Model, ModelForwardAttributes } from './models/model';
import { Task } from './training/tasks/Task';
import { TrainingOptions, TrainingLogEntry } from './training/types';
import { AdamWOptimizer } from './training/AdamW';
import { DatasetMetadata } from './loader/types';
interface TrainingProgress {
    lastLog: TrainingLogEntry;
    progress: number;
    remaining: number;
}
export type TrainingType = 'pretraining' | 'sft';
export default class Trainer extends EE<'start' | 'stop' | 'log'> {
    private trainer;
    readonly trainingType: TrainingType;
    private hasTrained;
    private trainDataset?;
    private validationDataset?;
    private totalTokens;
    private tokensProcessed;
    log: TrainingLogEntry[];
    private progress;
    options: TrainingOptions;
    protected tokenizer: ITokeniser;
    constructor(model: Model<ModelForwardAttributes>, tokeniser: ITokeniser, trainingType?: TrainingType, options?: TrainingOptions, optimizer?: AdamWOptimizer);
    constructor(trainer: Trainer, options?: TrainingOptions);
    get model(): Model<ModelForwardAttributes>;
    get optimizer(): AdamWOptimizer;
    stop(): void;
    reset(): void;
    dispose(): void;
    getTotalTokens(): number;
    setOptions(options: TrainingOptions): void;
    prepare(tasks?: Task[] | Uint16Array, datasets?: DatasetMetadata[]): Promise<void>;
    private configureModel;
    train(): Promise<void>;
    step(options?: TrainingOptions): Promise<void>;
    getLog(): TrainingLogEntry[];
    getProgress(): TrainingProgress | null;
    isPrepared(): boolean;
}
export {};
