import type { LlamaCppMemorySafetyConfig, LlamaCppModelMemoryInfo } from "./llama-cpp-provider-config.js"; export interface EstimateMemoryUsageOptions { model: LlamaCppModelMemoryInfo; contextSize: number; /** * GGUF model file size, if known. */ modelFileSizeBytes?: number; /** * Multimodal projector file size, if known. */ mmprojFileSizeBytes?: number; /** * Override bytes per K/V cache element. Defaults to model metadata or f16. */ kvCacheBytesPerValue?: number; /** * Extra overhead for llama.cpp compute buffers and Metal allocations. * Defaults to max(1 GiB, 15% of KV cache). */ computeOverheadBytes?: number; } export interface MemoryUsageEstimate { contextSize: number; kvCacheBytes: number; modelBytes: number; mmprojBytes: number; computeOverheadBytes: number; totalBytes: number; bytesPerToken: number; maxContextSize?: number; } export interface MemorySafetyCheckOptions { model?: LlamaCppModelMemoryInfo; contextSize?: number; modelFileSizeBytes?: number; mmprojFileSizeBytes?: number; memorySafety?: LlamaCppMemorySafetyConfig; } export interface MemorySafetyCheckResult { contextSize: number; estimate?: MemoryUsageEstimate; } export declare function estimateMemoryUsage(options: EstimateMemoryUsageOptions): MemoryUsageEstimate; export declare function checkMemorySafety(options: MemorySafetyCheckOptions): MemorySafetyCheckResult; //# sourceMappingURL=memory-estimation.d.ts.map