█

AI/TLDR

Buy me a coffee
Buy me a coffee

Stella

Compact English text embedding models that rank high on MTEB with a small footprint

Embedding Models & InferenceOpen source
Language
Python
License
MIT
$pip install sentence-transformers
IN SHORT

What is Stella?

Stella is a family of English text embedding models that turn sentences and documents into vectors you can compare for meaning. The line includes a 1.5B-parameter model and a smaller 400M variant, both built on the GTE and Qwen2 base models from Alibaba. It sits in the Embedding Models & Inference category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed MIT.

Overview

Stella is a family of English text embedding models that turn sentences and documents into vectors you can compare for meaning. The line includes a 1.5B-parameter model and a smaller 400M variant, both built on the GTE and Qwen2 base models from Alibaba.

The models are aimed at developers building retrieval, semantic search, and similarity features who want strong MTEB benchmark results without running a 7B-parameter model. They support Matryoshka representations, so you can pick a smaller embedding size (for example 1024 instead of 8192) and trade a little accuracy for cheaper storage and faster comparison.

As an embedding model, Stella slots into the encoding step of a search or RAG pipeline: you embed your documents once, store the vectors, and embed each query at request time to find the closest matches. It loads through the standard sentence-transformers and transformers libraries.

What it does

  • Two model sizes: a 1.5B-parameter model and a smaller 400M variant for tighter resource budgets
  • Strong MTEB retrieval scores for its size, competitive with much larger models
  • Matryoshka (MRL) embeddings: choose a dimension from 256 up to 8192, with 1024 a good default
  • Separate prompts for retrieval (s2p_query) and similarity (s2s_query) tasks
  • Loads with the standard sentence-transformers and transformers APIs
  • Built on Alibaba's gte-large-en-v1.5 and gte-Qwen2-1.5B-instruct base models

Getting started

Stella runs through the sentence-transformers library. Install it, load the model, and encode queries and documents to compare them.

Install sentence-transformers

Stella loads through the standard sentence-transformers package.

bashbash
pip install sentence-transformers

Embed queries and documents

Load the model with trust_remote_code, use the s2p_query prompt for queries, and compare against document embeddings.

pythonpython
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("NovaSearch/stella_en_1.5B_v5", trust_remote_code=True)

queries = ["What are some ways to reduce stress?"]
docs = ["There are many effective ways to reduce stress..."]

query_embeddings = model.encode(queries, prompt_name="s2p_query")
doc_embeddings = model.encode(docs)
similarities = model.similarity(query_embeddings, doc_embeddings)
print(similarities)

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Power semantic search over a document collection by embedding documents once and matching each query against them
  • Provide the retrieval step in a RAG pipeline that feeds relevant context to a language model
  • Cluster or deduplicate text by comparing embedding similarity
  • Get strong embedding quality on a smaller GPU or memory budget than a 7B-parameter model would need

How Stella compares

Stella alongside other open-source embedding models & inference tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Sentence Transformers★ 19.3kThe standard Python framework for loading, training, and computing embeddings with sentence and reranking models.
OpenCLIP★ 14.3kAn open implementation of CLIP for training and running image-text embedding models, with a large catalogue of pretrained checkpoints for zero-shot classification and retrieval.
PyTorch Metric Learning★ 6.3kPyTorch library of losses, miners, distances, samplers, trainers and accuracy testers for training embedding models with deep metric and self-supervised learning.
EmbeddingGemma (Gemma)★ 5.9kGoogle DeepMind's Gemma repo, home to EmbeddingGemma, a 308M multilingual embedding model small enough to run on-device for RAG and semantic search.
Text Embeddings Inference (TEI)★ 5.1kHugging Face's Rust-based server for deploying embedding, reranking, and sequence-classification models with high throughput on GPU or CPU.
text2vec★ 5kPython library for sentence embeddings and text similarity, implementing Word2Vec, BM25, Sentence-BERT, CoSENT and BGE with Chinese and multilingual models.
Infinity (Embeddings)★ 3kA high-throughput serving engine for text embeddings, rerankers, CLIP, and ColPali models, exposing an OpenAI-compatible API.
Stella★ 63Compact English text embedding models that rank high on MTEB with a small footprint