Model2Vec
A local text embedding library that runs on CPU, distills sentence transformers without a dataset, and integrates with LangChain.

Model2Vec is a Python package for developers who need text embeddings for search or classification on their own hardware. It turns sentence transformers into smaller static embedding models, trading a small drop in performance for lower model size and faster CPU inference.
- Pretrained embeddings let you choose English general-purpose and retrieval models based on bge-base-en-v1.5, multilingual embeddings based on bge-m3, or code embeddings based on CodeRankEmbed.
- Custom distillation creates embeddings from a sentence transformer and a vocabulary without requiring a training dataset, and the process runs on CPU.
- Classification training lets you fine-tune classification models on top of Model2Vec embeddings; subword embeddings are also supported.
- Library integrations connect the models to Sentence Transformers and LangChain, while Hugging Face Hub supports loading and sharing models.
Model2Vec is open source under the MIT license. Embedding inference runs locally on CPU, and the base package's only major dependency is NumPy. The project reports models up to 50 times smaller and CPU inference up to 500 times faster than the source transformer, with a small performance reduction.