pub fn load_mmap<M>(
path: impl AsRef<Path>,
expected_type: ModelType,
) -> Result<M, AprenderError>where
M: DeserializeOwned,Expand description
Load a model using memory-mapped I/O via aprender’s bundle::MappedFile.
This is the framework-side load_mmap (distinct from the leaf’s
memmap2-direct one): it uses aprender-core’s bundle abstraction. Existing
aprender::format::load_mmap callers resolve here.
§Errors
Returns an error on file-not-found, a format error, a type mismatch, or a checksum failure.