"""llama.cpp VRAM estimation helpers. Pure calculation logic, importable without Gradio so it can be unit-tested. """ from .quant import QUANT_BPW, weight_bytes, quant_from_filename from .kv import kv_cache_bytes, cache_dtype_bytes, compute_scratch_bytes from .yarn import ( yarn_effective_context, yarn_warnings, yarn_coherence_warnings, extension_ratio, YarnConfig, auto_configure_yarn, ) from .gpu import GpuBudget, GpuSpec, gpu_split, fit_gpus, GpuSplitResult from .gguf import ( GGUFMetadata, parse_header_bytes, parse_header_with_tensors, parse_local_file, parse_hf_range, metadata_to_arch, ) from .draft import DraftInputs, DraftBreakdown, draft_bytes, SPEC_TYPES, SPEC_DEFAULTS, SPEC_FAMILY from .mmproj import Mmproj, MmprojBreakdown, mmproj_bytes_from_tensors, mmproj_bytes_from_meta from .autofit import max_context, best_quant, min_gpu_setup from .report import ( ModelArch, Inputs, Breakdown, estimate, command_preview, format_bytes, ) __all__ = [ "QUANT_BPW", "weight_bytes", "quant_from_filename", "kv_cache_bytes", "cache_dtype_bytes", "compute_scratch_bytes", "yarn_effective_context", "yarn_warnings", "yarn_coherence_warnings", "extension_ratio", "YarnConfig", "auto_configure_yarn", "GpuBudget", "GpuSpec", "GpuSplitResult", "gpu_split", "fit_gpus", "GGUFMetadata", "parse_header_bytes", "parse_header_with_tensors", "parse_local_file", "parse_hf_range", "metadata_to_arch", "DraftInputs", "DraftBreakdown", "draft_bytes", "SPEC_TYPES", "SPEC_DEFAULTS", "SPEC_FAMILY", "Mmproj", "MmprojBreakdown", "mmproj_bytes_from_tensors", "mmproj_bytes_from_meta", "max_context", "best_quant", "min_gpu_setup", "ModelArch", "Inputs", "Breakdown", "estimate", "command_preview", "format_bytes", ]