Rust Model2Vec: 1.7x Faster Inference
2025-05-18
The `model2vec-rs` crate provides a lightweight Rust implementation for loading and inferencing Model2Vec static embedding models, boasting a 1.7x speedup over the Python version. It supports loading pre-trained models from Hugging Face Hub, offers a command-line interface, and allows for custom encoding arguments. Benchmarks show the Rust version processes 8000 samples per second compared to Python's 4650.
Development
Text Embedding