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
Categoria | Detalhes |
---|---|
Nome do modelo | BAAI/bge-reranker-v2-m3 |
Versão | Original |
Categoria do modelo | Reranker |
Tamanho | 568M parâmetros |
Modelo HuggingFace | BAAI/bge-reranker-v2-m3 |
Licença | Apache 2.0 |
Capacidades
Recurso | Detalhes |
---|---|
Suporte a Longo Prazo da Azion (LTS) | ✅ / ❌ |
Comprimento do Contexto | 8192 |
Suporta LoRA | ❌ |
Dados de entrada | Texto |
Uso
Exemplo de reranking
Este é um exemplo de uma requisição básica de reranking usando este modelo:
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:
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" } }}