Skip to main content

Crate blazen_model_cache

Crate blazen_model_cache 

Source
Expand description

Shared model download and cache layer for Blazen local-inference backends.

Provides ModelCache for downloading and caching ML models from HuggingFace Hub. Designed to be shared by all local-inference backends (fastembed, mistral.rs, whisper.cpp, etc.).

§wasm32 support

On wasm32-* targets the underlying download stack (hf-hub, dirs, tokio::fs) is not available, so ModelCache is a stub that always returns CacheError::Unsupported. Browser/Worker callers should obtain model bytes through a different mechanism (e.g. fetch() on the JS side, pre-bundled assets, or a manually populated cache directory).

Structs§

ModelCache
Local cache for ML models downloaded from HuggingFace Hub.

Enums§

CacheError
Errors that can occur during model cache operations.

Traits§

ProgressCallback
Callback trait for receiving download progress updates.