import { Tensor } from '@tensorflow/tfjs-core';
import { ForwardAttributes, default as BaseLayer } from '../layers/BaseLayer';
import { AttentionScores, KVCache } from '../layers/CausalSelfAttention';
import { TransformersMetadata } from '../loader/types';
import { GPTConfig, LoRAConfig } from './config';
import { default as LoRA } from '../layers/LoRA';
export interface ModelForwardAttributes extends ForwardAttributes {
    cache?: KVCache[];
    attentionScores?: AttentionScores;
    seed?: number;
    skipLogits?: boolean;
}
export interface TrainingState {
    steps: number;
    learningRate: number;
    batchSize: number;
    loss: number;
    tokensProcessed: number;
    duration: number;
}
export default abstract class Model<T extends ModelForwardAttributes, C extends GPTConfig = GPTConfig> extends BaseLayer<T, C> {
    lossScaling: number;
    trainingState: TrainingState | null;
    metaData: TransformersMetadata;
    private loraLayer?;
    private loraMap;
    constructor(config: C);
    createLoRA(name: string, loraConfig: LoRAConfig): void;
    deleteLoRA(name: string): void;
    renameLoRA(oldName: string, newName: string): void;
    mergeLoRA(name: string): void;
    attachLoRA(name: string): void;
    detachLoRA(): void;
    hasLoRA(name?: string): boolean;
    listLoRAs(): string[];
    get lora(): LoRA | null;
    abstract getClassName(): string;
    abstract forward(attrs: T, idx: Tensor): Tensor;
    abstract project(embeddings: Tensor): Tensor;
    abstract dispose(): void;
    getNumParams(): number;
    protected validateInput(idx: Tensor): void;
}
