Models / Rerank / Mxbai Rerank Large V2 API
Mxbai Rerank Large V2 API
Rerank
1.5B-parameter RL-trained reranking model achieving state-of-the-art accuracy across 100+ languages with 8K context, outperforming Cohere and Voyage.
Read our Docs

New
API Usage
How to use Mxbai Rerank Large V2Model CardPrompting Mxbai Rerank Large V2Applications & Use CasesHow to use Mxbai Rerank Large V2Mxbai Rerank Large V2 API Usage
Endpoint
mixedbread-ai/Mxbai-Rerank-Large-V2
RUN INFERENCE
curl -X POST "https://api.together.ai/v1/rerank" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mixedbread-ai/Mxbai-Rerank-Large-V2",
"documents": [
"The giant panda (Ailuropoda melanoleuca), also known as the panda bear or simply panda, is a bear species endemic to China",
"The llama is a domesticated South American camelid, widely used as a meat and pack animal by Andean cultures since the pre-Columbian era.",
"The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.",
"The guanaco is a camelid native to South America, closely related to the llama. Guanacos are one of two wild South American camelids; the other species is the vicuña, which lives at higher elevations."
],
"query": "What animals can I find near Peru?"
}'
JSON RESPONSE
RUN INFERENCE
from together import Together
client = Together()
query = "What animals can I find near Peru?"
documents = [
"The giant panda (Ailuropoda melanoleuca), also known as the panda bear or simply panda, is a bear species endemic to China.",
"The llama is a domesticated South American camelid, widely used as a meat and pack animal by Andean cultures since the pre-Columbian era.",
"The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.",
"The guanaco is a camelid native to South America, closely related to the llama. Guanacos are one of two wild South American camelids; the other species is the vicuña, which lives at higher elevations.",
]
response = client.rerank.create(
model="mixedbread-ai/Mxbai-Rerank-Large-V2",
query=query,
documents=documents,
top_n=2
)
for result in response.results:
print(f"Document Index: {result.index}")
print(f"Document: {documents[result.index]}")
print(f"Relevance Score: {result.relevance_score}")
JSON RESPONSE
RUN INFERENCE
import Together from "together-ai";
async function rankDocuments() {
const together = new Together();
const query = "What animals can I find near Peru?";
const documents = [
"The giant panda (Ailuropoda melanoleuca), also known as the panda bear or simply panda, is a bear species endemic to China.",
"The llama is a domesticated South American camelid, widely used as a meat and pack animal by Andean cultures since the pre-Columbian era.",
"The wild Bactrian camel (Camelus ferus) is an endangered species of camel endemic to Northwest China and southwestern Mongolia.",
"The guanaco is a camelid native to South America, closely related to the llama. Guanacos are one of two wild South American camelids; the other species is the vicuña, which lives at higher elevations.",
];
try {
const response = await together.rerank({
model: "mixedbread-ai/Mxbai-Rerank-Large-V2",
query: query,
documents: documents,
top_n: 2
});
response.results.forEach(result => {
console.log(`Document Index: ${result.index}`);
console.log(`Document: ${documents[result.index]}`);
console.log(`Relevance Score: ${result.relevance_score}`);
});
} catch (error) {
console.error('Error:', error);
}
}
rankDocuments();
JSON RESPONSE
Model Provider:
Mixedbread AI
Type:
Rerank
Variant:
Parameters:
1.5B
Deployment:
✔ Serverless
Quantization
Context length:
8192
Pricing:
$0.10
Run in playground
Deploy model
Quickstart docs
Quickstart docs
How to use Mxbai Rerank Large V2
Model details
🌟 Features
- state-of-the-art performance and strong efficiency
- multilingual support (100+ languages, outstanding English and Chinese performance)
- code support
- long-context support
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:
- GRPO (Guided Reinforcement Prompt Optimization)
- Contrastive Learning
- Preference Learning
Prompting Mxbai Rerank Large V2
Applications & Use Cases
How to use Mxbai Rerank Large V2
Looking for production scale? Deploy on a dedicated endpoint
Deploy Mxbai Rerank Large V2 on a dedicated endpoint with custom hardware configuration, as many instances as you need, and auto-scaling.
