Skip to main content
You can use FastEmbed to run embedding models locally in Mem0. FastEmbed is an ONNX-based embedding library that runs efficiently on CPU without requiring a GPU or an external API key.

Installation

FastEmbed is an optional dependency, so install it alongside Mem0.

Usage

The Python and TypeScript SDKs default to different models. Python defaults to thenlper/gte-large (1024 dimensions), while TypeScript defaults to fast-bge-small-en-v1.5 (384 dimensions). The TypeScript package (fastembed on npm) ships a fixed set of ONNX models and does not include thenlper/gte-large. Because the two defaults produce vectors of different dimensions, do not point both SDKs at the same vector store collection unless you configure them to use the same model.
The TypeScript SDK supports these FastEmbed models. Pass the exact string as model:
  • fast-bge-small-en-v1.5 (default)
  • fast-bge-small-en
  • fast-bge-base-en
  • fast-bge-base-en-v1.5
  • fast-bge-small-zh-v1.5
  • fast-all-MiniLM-L6-v2
  • fast-multilingual-e5-large

Config

Here are the parameters available for configuring the FastEmbed embedder: