/**
 * Transformers.js Backend Implementation
 * Fallback backend using HuggingFace Transformers.js with ONNX runtime
 */
import type { LLMProvider, ChatMessage, GenerateOptions, StreamCallback, LoadProgressCallback, Backend, Device, Quantization } from '../types';
/**
 * Default model for Transformers.js backend
 * Using Qwen2.5 0.5B as it's well-tested with ONNX
 */
export declare const DEFAULT_TRANSFORMERS_MODEL = "onnx-community/Qwen2.5-0.5B-Instruct";
/**
 * Transformers.js compatible models (must have ONNX weights)
 * These are specifically converted for browser use via transformers.js
 *
 * @see https://huggingface.co/onnx-community for more models
 */
export declare const TRANSFORMERS_MODELS: {
    readonly 'qwen-2.5-0.5b': "onnx-community/Qwen2.5-0.5B-Instruct";
    readonly 'qwen-2.5-1.5b': "onnx-community/Qwen2.5-1.5B-Instruct";
    readonly 'qwen-2.5-coder-0.5b': "onnx-community/Qwen2.5-Coder-0.5B-Instruct";
    readonly 'qwen-2.5-coder-1.5b': "onnx-community/Qwen2.5-Coder-1.5B-Instruct";
    readonly 'qwen-3-0.6b': "onnx-community/Qwen3-0.6B-ONNX";
    readonly 'smollm2-135m': "HuggingFaceTB/SmolLM2-135M-Instruct";
    readonly 'smollm2-360m': "HuggingFaceTB/SmolLM2-360M-Instruct";
    readonly 'smollm2-1.7b': "HuggingFaceTB/SmolLM2-1.7B-Instruct";
    readonly 'phi-3-mini': "Xenova/Phi-3-mini-4k-instruct";
    readonly tinyllama: "Xenova/TinyLlama-1.1B-Chat-v1.0";
};
export type TransformersModelAlias = keyof typeof TRANSFORMERS_MODELS;
/**
 * Model size estimates for UI display
 */
export declare const TRANSFORMERS_MODEL_SIZES: Record<TransformersModelAlias, string>;
/**
 * Configuration for TransformersProvider
 */
export interface TransformersProviderConfig {
    device?: Device;
    quantization?: Quantization;
}
/**
 * Transformers.js provider implementation
 */
export declare class TransformersProvider implements LLMProvider {
    readonly backend: Backend;
    private pipeline;
    private currentModel;
    private device;
    private quantization;
    constructor(config?: TransformersProviderConfig);
    get isReady(): boolean;
    get modelId(): string | null;
    load(modelId: string, onProgress?: LoadProgressCallback): Promise<void>;
    chat(messages: ChatMessage[], options?: GenerateOptions): Promise<string>;
    stream(messages: ChatMessage[], onToken: StreamCallback, options?: GenerateOptions): Promise<string>;
    unload(): Promise<void>;
}
/**
 * Create a Transformers.js provider instance
 */
export declare function createTransformersProvider(config?: TransformersProviderConfig): TransformersProvider;
//# sourceMappingURL=transformers.d.ts.map