Package-level declarations
Types
A ModelByteSource over an in-memory byte array (for example a header prefix or a test fixture).
The SHA-256 of the downloaded file differs from the expected digest. The partial file has been deleted.
Events emitted by ModelDownloader.download.
The server answered with an HTTP status that cannot be retried (for example 403 or 404).
The server answered in a way that breaks the HTTP Range protocol (for example a Content-Range at the wrong offset).
The downloaded size differs from the expected size or from the size the server announced.
A network-level failure (connection reset, timeout, server error) that ModelDownloader retries, resuming from the bytes already written. HttpTransport implementations throw it for I/O errors.
Append-only output file.
Parsed GGUF header: metadata key/values and tensor descriptors. Tensor data is never read.
GGUF metadata value types (gguf_type).
A response passed to the HttpTransport.get handler.
Minimal HTTP GET client used by ModelDownloader. Kept small so apps can plug in their own stack (OkHttp, Ktor, a corporate proxy) and tests can use a fake server.
ModelFileSystem backed by java.io / java.nio (Android API 26+ and JVM desktop).
Options for estimateLlmPeakRam.
Random-access, read-only bytes of a model file, used by the header parsers.
On-disk model cache: a directory of downloaded model files with a size budget and least-recently-used eviction.
One model file in a ModelCache.
Resumable, chunked model downloader using HTTP Range requests.
Base class of download failures raised by ModelDownloader.
Minimal blocking file-system API used by the model manager. Paths are platform paths: / separated on every supported platform, and \ separated too on Windows. Call it from an I/O dispatcher.
A file-system operation of a ModelFileSystem failed.
Container format of a model file.
A model file is not a valid GGUF / Whisper ggml file, or its header is truncated or corrupt.
Summary of a model file from its header, without loading weights.
Detects the model format from the magic number and parses the header.
A borrowed resident model. While at least one lease is open the model is never evicted. Closing a lease twice is a no-op.
Base class of every error raised by :kggml-model-manager.
Pre-load estimate of the peak memory an engine needs for a model, computed from the header only.
In-memory cache of loaded models (engines or other AutoCloseable resources) with a RAM budget and OS low-memory eviction.
HttpTransport on java.net.HttpURLConnection (no third-party HTTP stack). Blocking; ModelDownloader calls it on modelIoDispatcher. Redirects are followed within the same protocol.
Hyper-parameters of a whisper.cpp ggml model file (whisper_hparams, in file order).
Parsed whisper.cpp ggml model header (legacy, non-GGUF format): hyper-parameters, mel filter shape, vocabulary size and tensor descriptors. Tensor data is skipped, never read.
Functions
The platform HttpTransport (HttpURLConnection on Android and JVM, NSURLSession on iOS).
The platform HttpTransport (HttpURLConnection on Android and JVM, NSURLSession on iOS).
The platform ModelFileSystem.
The platform ModelFileSystem.
Estimates the peak RAM needed to run the LLM described by header with llama.cpp.
Estimates the peak RAM needed to run the Whisper model described by header with whisper.cpp (one state).
The dispatcher blocking model-manager I/O runs on (Dispatchers.IO).
The dispatcher blocking model-manager I/O runs on (Dispatchers.IO).