zebraindex

Embedding Models

zebraindex ships with a registry of 13 embedding models. Models are downloaded automatically on first use from HuggingFace. Switch models with --model:

zebraindex --model BAAI/bge-small-en-v1.5 index .

Note: changing the model requires re-indexing — embeddings from different models are not compatible.


ModelParamsContextNotes
jinaai/jina-embeddings-v2-base-code137M8192Default. State-of-the-art for code search. 30+ languages.

General purpose — small (CPU-friendly)

ModelParamsNotes
sentence-transformers/all-MiniLM-L6-v222.7MFastest; minimal memory
sentence-transformers/all-MiniLM-L12-v233.4MSlightly better than L6
BAAI/bge-small-en-v1.533.4MBest accuracy in this size class
intfloat/e5-small-v233.4MRequires query:/passage: prefixes
thenlper/gte-small33.4MNo prefixes needed; robust on varied text

ModelParamsNotes
BAAI/bge-base-en-v1.5109MExcellent accuracy/speed balance
intfloat/e5-base-v2109MHigh accuracy; strict prefix routing
thenlper/gte-base109MNo prefixes; competes with BGE/E5

Multilingual

ModelParamsLanguagesNotes
intfloat/multilingual-e5-small118M100+Good for mixed-language repos
intfloat/multilingual-e5-base278M100+GPU recommended
BAAI/bge-m3567M100+Heavy; only dense retrieval in this mode

Hardware guide

HardwareRecommended models
CPU onlyMiniLM-L6, bge-small, gte-small
Metal (macOS M-series)jina-code (default), bge-base, gte-base
CUDA GPU (≥4 GB VRAM)Any model up to bge-base
CUDA GPU (≥12 GB VRAM)bge-m3, multilingual-e5-base

Run zebraindex doctor to see which device zebraindex is using and whether the current model fits in available memory.


Prefix routing

Models from the E5 and Jina families use instruction prefixes at inference time:

Configure custom prefixes when starting the daemon:

zebraindex --query-prefix "query: " --passage-prefix "passage: " index .

BGE, GTE, and MiniLM models do not require prefixes.