mixedbread-ai/mxbai-rerank-large-v2

🤗 Hugging Face 来源text-rankingapache-2.01.5B 参数3.1 GBsafetensors✓ 2 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo mixedbread-ai/mxbai-rerank-large-v2 ./model-folder
需要做种者 →



The crispy rerank family from Mixedbread.

🍞 Looking for a simple end-to-end retrieval solution? Meet Omni, our multimodal and multilingual model. Get in touch for access.

🍞 mxbai-rerank-large-v2 (a.k.a ProRank-1.5B)

This is the large model in our family of powerful reranker models. You can learn more about the models in our blog post.

We have two models:

The technical report is coming soon!

🌟 Features

  • state-of-the-art performance and strong efficiency
  • multilingual support (100+ languages, outstanding English and Chinese performance)
  • code support
  • long-context support

⚙️ Usage

Using Sentence Transformers

Install Sentence Transformers:

pip install sentence_transformers
from sentence_transformers import CrossEncoder

model = CrossEncoder("mixedbread-ai/mxbai-rerank-large-v2")

query = "Who wrote 'To Kill a Mockingbird'?"
documents = [
    "'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
    "The novel 'Moby-Dick' was written by Herman Melville and first published in 1851. It is considered a masterpiece of American literature and deals with complex themes of obsession, revenge, and the conflict between good and evil.",
    "Harper Lee, an American novelist widely known for her novel 'To Kill a Mockingbird', was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
    "Jane Austen was an English novelist known primarily for her six major novels, which interpret, critique and comment upon the British landed gentry at the end of the 18th century.",
    "The 'Harry Potter' series, which consists of seven fantasy novels written by British author J.K. Rowling, is among the most popular and critically acclaimed books of the modern era.",
    "'The Great Gatsby', a novel written by American author F. Scott Fitzgerald, was published in 1925. The story is set in the Jazz Age and follows the life of millionaire Jay Gatsby and his pursuit of Daisy Buchanan.",
]

pairs = [(query, doc) for doc in documents]
scores = model.predict(pairs)
print(scores)
# [12.      0.5    11.125   0.8125  2.8125  1.5   ]

rankings = model.rank(query, documents)
print(rankings)
# [{'corpus_id': 0, 'score': 12.0}, {'corpus_id': 2, 'score': 11.125}, {'corpus_id': 4, 'score': 2.8125}, {'corpus_id': 5, 'score': 1.5}, {'corpus_id': 3, 'score': 0.8125}, {'corpus_id': 1, 'score': 0.5}]

Using mxbai-rerank

  1. Install mxbai-rerank
pip install mxbai-rerank
  1. Inference
from mxbai_rerank import MxbaiRerankV2

model = MxbaiRerankV2("mixedbread-ai/mxbai-rerank-large-v2")

query = "Who wrote 'To Kill a Mockingbird'?"
documents = [
    "'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
    "The novel 'Moby-Dick' was written by Herman Melville and first published in 1851. It is considered a masterpiece of American literature and deals with complex themes of obsession, revenge, and the conflict between good and evil.",
    "Harper Lee, an American novelist widely known for her novel 'To Kill a Mockingbird', was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
    "Jane Austen was an English novelist known primarily for her six major novels, which interpret, critique and comment upon the British landed gentry at the end of the 18th century.",
    "The 'Harry Potter' series, which consists of seven fantasy novels written by British author J.K. Rowling, is among the most popular and critically acclaimed books of the modern era.",
    "'The Great Gatsby', a novel written by American author F. Scott Fitzgerald, was published in 1925. The story is set in the Jazz Age and follows the life of millionaire Jay Gatsby and his pursuit of Daisy Buchanan."
]

# Lets get the scores
results = model.rank(query, documents, return_documents=True, top_k=3)

print(results)

Performance

Benchmark Results

Model BEIR Avg Multilingual Chinese Code Search Latency (s)
mxbai-rerank-large-v2 57.49 29.79 84.16 32.05 0.89
mxbai-rerank-base-v2 55.57 28.56 83.70 31.73 0.67
mxbai-rerank-large-v1 49.32 21.88 72.53 30.72 2.24

*Latency measured on A100 GPU

Training Details

The models were trained using a three-step process:

  1. GRPO (Guided Reinforcement Prompt Optimization)
  2. Contrastive Learning
  3. Preference Learning

For more details, check our technical report and technical blog post.

🎓 Citation

If you find our models useful, please consider giving a star and citation

arXiv:

@article{li2025prorank,
  title={ProRank: Prompt Warmup via Reinforcement Learning for Small Language Models Reranking},
  author={Xianming Li and Aamir Shakir and Rui Huang and Julius Lipp and Benjamin Clavié and Jing Li},
  journal={arXiv preprint arXiv:2506.03487},
  year={2025}
}

blog post:

@online{v2rerank2025mxbai,
  title={Baked-in Brilliance: Reranking Meets RL with mxbai-rerank-v2},
  author={Sean Lee and Rui Huang and Aamir Shakir and Julius Lipp},
  year={2025},
  url={https://www.mixedbread.com/blog/mxbai-rerank-v2},
}