You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump crate to v0.2 and introduce several performance, compatibility, and CI improvements.
Key changes:
- Version bump to 0.2.0 and add dependencies: memmap2, rayon, unicode-normalization.
- Add GitHub automation: dependabot config, CI workflow (check/test/clippy/fmt/doc/bench/msrv) and release workflow.
- Memory-mapped SafeTensors support: SafeTensorsFile::load_mmap, DataStore enum (Owned/Mapped), data_offset handling, and Embedder now loads weights with ModelWeights::load_mmap to avoid copying large model files.
- Extended SafeTensors parsing: header parsing refactor, BF16 support (bf16_to_f32), F16/F32 handling, more robust error checks, and unit tests.
- Multi-model weight support: ModelConfig.model_type, DistilBERT-aware loading path (no token_type_embeddings, different tensor names) and ModelWeights.from_safetensors abstraction; token_type_embeddings made optional.
- SIMD-accelerated tensor primitives: new tensor/simd module with AVX2 implementations and scalar fallbacks; used in matmul and ops for faster matmul/elementwise/scalar operations; includes tests.
- Parallel tokenization: tokenizer.encode_batch now uses rayon for parallel encoding.
- Small fixes and cleanups: clamp GELU constant precision, lib crate-level clippy allows, example doc comment formatting, and test/fixture tooling (scripts/generate_golden.py and tests/golden_test.rs).
These changes reduce memory usage and improve performance for large models, add broader dtype support, and improve CI/automation.
0 commit comments