# model2vec-rs

> Fast State-of-the-Art Static Embeddings in Rust

Source: https://talira.ai/catalog/model2vec-rs-nng7brwf
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [ai / embeddings / libraries](https://talira.ai/categories/ai/embeddings/libraries), [search / semantic search](https://talira.ai/categories/search/semantic-search), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT[^2][^3]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Backed by: [Minish](https://talira.ai/orgs/minish.md)
- Creator: Thomas van Dongen and Stéphan Tulkens

model2vec-rs is Minish's official Rust implementation of inference for [Model2Vec](https://talira.ai/catalog/model2vec-8r1qxjkw.md) static embedding models such as [potion-base-8M](https://talira.ai/catalog/potion-base-8m-78qc5xh7.md) and [potion-retrieval-32M](https://talira.ai/catalog/potion-retrieval-32m-a9wwc9ze.md): it tokenizes text, looks up stored token vectors and averages them, with no neural network, so it embeds hundreds of thousands of texts per second on a CPU. It loads models from the Hugging Face Hub, a local path or in-memory bytes (for WebAssembly and embedded builds), keeps f32, f16 and int8 weights and can quantize to int8 at load time, and comes as a library, an opt-in CLI and Python bindings. Minish measured 575,000 texts a second on one thread and 2.6 million on all cores of an M3 Pro, 15 to 24 times faster than Python Model2Vec; distillation and training stay in the Python package.

## Links

- Website: https://minish.ai/packages/model2vec-rs/usage/
- GitHub: https://github.com/MinishLab/model2vec-rs
- Docs: https://docs.rs/model2vec-rs

## Problems it solves

- embed text in a Rust program at hundreds of thousands of sentences per second on a CPU
- sentence embeddings in Rust without ONNX Runtime, libtorch or any C++ dependency
- compile my embedding model into the binary and load it from bytes at startup
- run text embeddings in WebAssembly
- a command-line tool that turns a file of sentences into embeddings as JSON
- embeddings in Rust that load in milliseconds, for a CLI that starts often
- embed huge text collections for deduplication or clustering without a GPU
- speed up Python Model2Vec inference with a native extension
- cut an embedding model's memory to a quarter with int8 quantization
- an offline-only build that can't download models from the internet

## Features

- inference for Model2Vec static models: tokenize, look up, average
- loads from the Hugging Face Hub, local paths, or bytes (from_bytes) for WASM and embedded use
- f32, f16 and int8 weights; quantize_int8 at load time
- batch encoding with configurable max length and batch size; Rayon parallelism
- flat row-major output (encode_flat)
- opt-in CLI (cli feature): encode-single and encode a file to JSON
- Python bindings (model2vec_rs.StaticModel) that release the GIL
- local-only and wasm feature sets
- 575K texts/s single-threaded, 2.6M texts/s on all cores of an M3 Pro (Minish's benchmark)

## Limitations

- Doesn't distill or train models: that's the Python model2vec package; model2vec-rs only runs inference[^1]

## Capabilities

- Has a command line tool: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.40 out of 1.
Signals: backing 0.50, extensibility 0.20.

- backed by Minish
- created by Thomas van Dongen and Stéphan Tulkens

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [Model2Vec](https://talira.ai/catalog/model2vec-8r1qxjkw.md)
- Works with [potion-base-8M](https://talira.ai/catalog/potion-base-8m-78qc5xh7.md)
- Works with [potion-retrieval-32M](https://talira.ai/catalog/potion-retrieval-32m-a9wwc9ze.md)

## Alternatives

- [fastembed-rs](https://talira.ai/catalog/fastembed-rs-9cry7y9m.md): Rust library for generating vector embeddings, reranking locally
- [candle](https://talira.ai/catalog/candle-mxvc1kc7.md): Minimalist ML framework for Rust
- [Model2Vec](https://talira.ai/catalog/model2vec-8r1qxjkw.md): Fast state-of-the-art static embeddings, and lightweight classifiers trained on top of them

## Sources

[^1]: https://github.com/MinishLab/model2vec-rs (checked 20 Nov 2026)
[^2]: https://github.com/MinishLab/model2vec-rs/blob/main/LICENSE (checked 20 Nov 2026)
[^3]: https://pypi.org/project/model2vec-rs/ (checked 20 Nov 2026)
