BAAI/bge-reranker-v2-m3

BAAI/bge-reranker-v2-m3 é um modelo de reranking leve com fortes capacidades multilíngues. Ele é fácil de implantar e oferece inferência rápida.

Detalhes do modelo

CategoriaDetalhes
Nome do modeloBAAI/bge-reranker-v2-m3
VersãoOriginal
Categoria do modeloReranker
Tamanho568M parâmetros
Modelo HuggingFaceBAAI/bge-reranker-v2-m3
LicençaApache 2.0

Capacidades

RecursoDetalhes
Suporte a Longo Prazo da Azion (LTS)✅ / ❌
Comprimento do Contexto8192
Suporta LoRA
Dados de entradaTexto

Uso

Exemplo de reranking

Este é um exemplo de uma requisição básica de reranking usando este modelo:

Terminal window
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"
]
}'

Exemplo de pontuação

Este é um exemplo de uma requisição básica de pontuação usando este modelo:

Terminal window
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"
]
}'

Executando com Edge Functions:

Este é um exemplo de como executar este modelo usando 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"
]
})

Schema JSON

{
"$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"
}
}
}