Model reference · open weights
E2Rank is an open-weight embedding model from Alibaba. E2Rank-8B (BF16) weighs 15.1 GB; the smallest configuration that runs it is RTX 4090 24 GB.
Summary of the Alibaba-NLP/E2Rank-0.6B model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | Alibaba |
|---|---|
| Released | 2025-10-24 |
| Parameters | 596M |
| VRAM | 15.1 GB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB … RTX 4060 Ti 16 GB | does not fit | |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| E2Rank-0.6B ↗ | 596M | BF16 | 1.2 GB | RTX 3060 12 GB |
| E2Rank-4B ↗ | 4.0B | BF16 | 8.0 GB | RTX 3060 12 GB |
| E2Rank-8B (above) ↗ | 7.6B | BF16 | 15.1 GB | RTX 4090 24 GB |
From the model card
We introduce E2Rank, meaning Efficient Embedding-based Ranking (also meaning Embedding-to-Rank), which extends a single text embedding model to perform both high-quality retrieval and listwise reranking, thereby achieving strong effectiveness with remarkable efficiency.
By applying cosine similarity between the query and document embeddings as a unified ranking function, the listwise ranking prompt, which is constructed from the original query and its candidate documents, serves as an enhanced query enriched with signals from the top-K documents, akin to pseudo-relevance feedback (PRF) in traditional retrieval models. This design preserves the efficiency and representational quality of the base embedding model while significantly improving its reranking performance.
Empirically, E2Rank achieves state-of-the-art results on the BEIR reranking benchmark and demonstrates competitive performance on the reasoning-intensive BRIGHT benchmark, with very low reranking latency. We also show that the ranking training process improves embedding performance on the MTEB benchmark. Our findings indicate that a single embedding model can effectively unify retrieval and reranking, offering both computational efficiency and competitive ranking accuracy.
Our work highlights the potential of single embedding models to serve as unified retrieval-reranking engines, offering a practical, efficient, and accurate alternative to complex multi-stage ranking systems.
| Supported Task | Model Name | Size | Layers | Sequence Length | Embedding Dimension | Instruction Aware |
|---|---|---|---|---|---|---|
| Embedding + Reranking | Alibaba-NLP/E2Rank-0.6B | 0.6B | 28 | 32K | 1024 | Yes |
| Embedding + Reranking | Alibaba-NLP/E2Rank-4B | 4B | 36 | 32K | 2560 | Yes |
| Embedding + Reranking | Alibaba-NLP/E2Rank-8B | 8B | 36 | 32K | 4096 | Yes |
| Embedding Only | Alibaba-NLP/E2Rank-0.6B-Embedding-Only | 0.6B | 28 | 32K | 1024 | Yes |
| Embedding Only | Alibaba-NLP/E2Rank-0.6B-Embedding-Only | 4B | 36 | 32K | 2560 | Yes |
| Embedding Only | Alibaba-NLP/E2Rank-0.6B-Embedding-Only | 8B | 36 | 32K | 4096 | Yes |
Note:
Embedding Onlyindicates that the model is trained only with the constrative learning and support embedding tasks, whileEmbedding + Rerankingindicates the full E2Rank model trained with both embedding and reranking objectives (for more detals, please refer to the paper).Instruction Awarenotes whether the model supports customizing the input instruction according to different tasks.
The usage of E2Rank as an embedding model is similar to Qwen3-Embedding. The only difference is that Qwen3-Embedding will automatically append an EOS token, while E2Rank requires users to manully append the special token `` at the end of each input text.
vLLM Usage (recommended)
# Requires vllm>=0.8.5
import torch
import vllm
from vllm import LLM
from vllm.config import PoolerConfig
def get_detailed_instruct(task_description: str, query: str) -> str:
return f'Instruct: {task_description}\nQuery:{query}'
# Each query must come with a one-sentence instruction that describes the task
task = 'Given a web search query, retrieve relevant passages that answer the query'
queries = [
get_detailed_instruct(task, 'What is the capital of China?'),
get_detailed_instruct(task, 'Explain gravity')
]
# No need to add instruction for retrieval documents
documents = [
"The capital of China is Beijing.",
"Gravity is a force that attracts two bodies towards each other. It gives weight to physical objects and is responsible for the movement of planets around the sun."
]
input_texts = queries + documents
input_texts = [t + "" for t in input_texts]
model = LLM(
model="Alibaba-NLP/E2Rank-0.6B",
task="embed",
override_pooler_config=PoolerConfig(pooling_type="LAST", normalize=True)
)
outputs = model.embed(input_texts)
embeddings = torch.tensor([o.outputs.embedding for o in outputs])
scores = (embeddings[:2] @ embeddings[2:].T)
print(scores.tolist())
# [[0.5958386659622192, 0.030148349702358246], [0.060259245336055756, 0.5595865249633789]]
# Requires transformers>=4.51.0
import torch
import torch.nn.functional as F
from torch import Tensor
from transformers import AutoTokenizer, AutoModel
def last_token_pool(last_hidden_states: Tensor, attention_mask: Tensor) -> Tensor:
left_padding = (attention_mask[:, -1].sum() == attention_mask.shape[0])
if left_padding:
return last_hidden_states[:, -1]
else:
sequence_lengths = attention_mask.sum(dim=1) - 1
batch_size = last_hidden_states.shape[0]
return last_hidden_states[torch.arange(batch_size, device=last_hidden_states.device), sequence_lengths]
def get_detailed_instruct(task_description: str, query: str) -> str:
return f'Instruct: {task_description}\nQuery:{query}'
# Each query must come with a one-sentence instruction that describes the task
task = 'Given a web search query, retrieve relevant passages that answer the query'
queries = [
get_detailed_instruct(task, 'WhatQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.