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§
- Model
Cache - Local cache for ML models downloaded from
HuggingFaceHub.
Enums§
- Cache
Error - Errors that can occur during model cache operations.
Traits§
- Progress
Callback - Callback trait for receiving download progress updates.