BAAI/bge-reranker-v2-m3
BAAI/bge-reranker-v2-m3 is a lightweight reranker model with strong multilingual capabilities. It’s easy to deploy and offers fast inference.
Model details
Category | Details |
---|---|
Model Name | BAAI/bge-reranker-v2-m3 |
Version | Original |
Model Category | Reranker |
Size | 568M parameters |
HuggingFace Model | BAAI/bge-reranker-v2-m3 |
License | Apache 2.0 |
Capabilities
Feature | Details |
---|---|
Azion Long-term Support (LTS) | ✅ / ❌ |
Context Length | 8192 |
Supports LoRA | ❌ |
Input data | Text |
Usage
Rerank example
This is an example of a basic rerank request using this model:
curl -X POST \ http://endpoint-url/rerank \ -H 'Content-Type: application/json' \ -d '{ "model": "BAAI/bge-reranker-v2-m3", "query": "What is deep learning?", "documents": [ "Deep learning is a subset of machine learning that uses neural networks with many layers", "The weather is nice today", "Deep learning enables computers to learn from large amounts of data", "I like pizza" ]}'
Score example
This is an example of a basic score request using this model:
curl -X POST \ http://endpoint-url/score \ -H 'Content-Type: application/json' \ -d '{ "model": "BAAI/bge-reranker-v2-m3", "text_1": "What is deep learning?", "text_2": [ "Deep learning is a subset of machine learning that uses neural networks with many layers", "The weather is nice today", "Deep learning enables computers to learn from large amounts of data", "I like pizza" ] }'
Running with Edge Functions:
This is an example of how to run this model using Edge Functions:
const modelResponse = await Azion.AI.run("baai-bge-reranker-v2-m3", { "query": "What is deep learning?", "documents": [ "Deep learning is a subset of machine learning that uses neural networks with many layers", "The weather is nice today", "Deep learning enables computers to learn from large amounts of data", "I like pizza" ]})
JSON schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [ "query", "documents" ], "properties": { "query": { "type": "string" }, "documents": { "type": "array", "items": { "type": "string" } }, "top_n": { "type": "integer" }, "max_tokens_per_doc": { "type": "integer" } }}