This model is a fine-tuned version of xlm-roberta-base on the None dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 3e-05 - trainbatchsize: 16 - evalbatchsize: 16 - lrschedulertype: linear - trainingsteps: 1800 - mixedprecisiontraining: Native AMP - Transformers 4.37.2 - Pytorch 2.1.0+cu121 - Datasets 2.17.1 - Tokenizers 0.15.2
Open-weight model · Text classification
bge-reranker-base
by Beijing Academy of Artificial Intelligence BAAI/bge-reranker-base
We have updated the new reranker, supporting larger lengths, more languages, and achieving better performance. More details please refer to our Github: FlagEmbedding.
Runs On
What it takes to serve bge-reranker-base (278M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.6 GB | 0.7 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.3 GB | 0.3 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.
SAVRN's Notes on bge-reranker-base
Retrieval pipelines need a second pass that re-scores what the first-stage retriever returns, and that is this 278M-parameter classifier's job: it reads a query and a passage together and scores the match. Memory is not the decision. At 16-bit the weights are 0.6 GB and the run needs 0.7 GB, under one percent of the 192 GB MI300X we price at $1.85 an hour, so it never gets its own card; it rides beside whatever generation model lives there.
The MIT terms are short and permissive: commercial use, modification and redistribution are allowed provided the copyright and permission notices stay with the files. The 514-token context must hold query and passage together, so chunk to fit. And the publisher's summary says newer rerankers with larger inputs and more languages shipped March 18, 2024, so decide whether this version or a successor is what you standardize on.
Model Card
By Beijing Academy of Artificial Intelligence, published under mit, revision 2cfc18c9415c.
We have updated the new reranker, supporting larger lengths, more languages, and achieving better performance.
FlagEmbedding
Model List | FAQ | Usage | Evaluation | Train | Citation | License
More details please refer to our Github: FlagEmbedding.
English | 中文
FlagEmbedding focuses on retrieval-augmented LLMs, consisting of the following projects currently:
- Long-Context LLM: Activation Beacon
- Fine-tuning of LM : LM-Cocktail
- Embedding Model: Visualized-BGE, BGE-M3, LLM Embedder, BGE Embedding
- Reranker Model: llm rerankers, BGE Reranker
- Benchmark: C-MTEB
News
Configuration
- Architecture
- XLMRobertaForSequenceClassification
- Context length (tokens)
- 514
- Layers
- 12
- Hidden size
- 768
- Feed-forward size
- 3,072
- Attention heads
- 12
- Vocabulary size
- 250,002
- Stored precision
- float32
- Model type
- xlm-roberta
Identity and Version
- Repository
- BAAI/bge-reranker-base
- Publisher
- Beijing Academy of Artificial Intelligence
- Task
- Text classification
- Modality
- Text
- Library
- sentence-transformers
- Parameters
- 278M parameters
- Languages
- en, zh
- Revision
- 2cfc18c9415c912f9d8155881c133215df768a70
- First published
- 2023-09-11
- Last updated
- 2024-06-24
Files and Weights
10 files, 3.4 GB in total. The weights are 3 files totalling 3.3 GB in bin, onnx, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 1.1 GB | ced967c45fd1 |
| onnx/model.onnx | Weights | 1.1 GB | 15b9a8c3da82 |
| pytorch_model.bin | Weights | 1.1 GB | 5b475bec4042 |
| config.json | Configuration | 799 B | — |
| special_tokens_map.json | Configuration | 279 B | — |
| README.md | Documentation | 34.1 KB | — |
| sentencepiece.bpe.model | Other | 5.1 MB | cfc8146abe2a |
| .gitattributes | Repository | 1.6 KB | — |
| tokenizer.json | Tokenizer | 17.1 MB | 9eb652ac4e40 |
| tokenizer_config.json | Tokenizer | 443 B | — |
License and Download
- License
- mit
- Access
- Open weights, no gate
- Download size
- 3.3 GB
Released by Beijing Academy of Artificial Intelligence through its official repository on Hugging Face. Read the license.
Built From
- Described by arXiv:2309.07597
- Described by arXiv:2310.07554
- Described by arXiv:2311.13534
- Described by arXiv:2312.15503
- Described by arXiv:2401.03462
Evaluations
Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.
| Benchmark | Conditions | Result | Reported by | Revision | Date |
|---|---|---|---|---|---|
| MTEB CMedQAv1 | Configuration defaultTask RerankingMetric mapComparison conditions not established | 81.2721 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB CMedQAv1 | Configuration defaultTask RerankingMetric mrrComparison conditions not established | 84.1424 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB CMedQAv2 | Configuration defaultTask RerankingMetric mapComparison conditions not established | 84.1037 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB CMedQAv2 | Configuration defaultTask RerankingMetric mrrComparison conditions not established | 86.7938 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB MMarcoReranking | Configuration defaultTask RerankingMetric mapComparison conditions not established | 35.4601 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB MMarcoReranking | Configuration defaultTask RerankingMetric mrrComparison conditions not established | 34.6024 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB T2Reranking | Configuration defaultTask RerankingMetric mapComparison conditions not established | 67.2773 | BAAI Publisher reported |
Evaluated revision not stated | — |
| MTEB T2Reranking | Configuration defaultTask RerankingMetric mrrComparison conditions not established | 77.1315 | BAAI Publisher reported |
Evaluated revision not stated | — |
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 3.3 GB |
| 16-bit | 0.6 GB |
| 8-bit | 0.3 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Compare bge-reranker-base
Questions About bge-reranker-base
How much GPU memory does bge-reranker-base need?
About 0.7 GB at 16-bit and 0.2 GB at 4-bit: the weights (278M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run bge-reranker-base on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use bge-reranker-base commercially?
Yes. bge-reranker-base is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.
What is bge-reranker-base's context length?
514 tokens, from the maximum position embeddings in its published configuration.
Similar Models
This repository contains a fine-tuned XLM-RoBERTa Base model for 3-class sentiment classification in Sindhi. The model predicts one of the following labels: - positive - neutral - negative This model is intended for research, experimentation, and lightweight production prototyping on Sindhi-language sentiment analysis tasks. It may be useful for short-text classification such as reviews, feedback, and social-media snippets. It should not be used as the only basis for high-stakes decisions. Performance can vary by domain, dialect, and writing style, and human review is recommended when errors could affect people or organizations. The saved model artifacts in this repository report the…
This model is a fine-tuned version of xlm-roberta-base on the Language Identification dataset. This model is an XLM-RoBERTa transformer model with a classification head on top (i.e. a linear layer on top of the pooled output). For additional information please refer to the xlm-roberta-base model card or to the paper Unsupervised Cross-lingual Representation Learning at Scale by Conneau et al. You can directly use this model as a language detector, i.e. for sequence classification tasks. Currently, it supports the following 20 languages: arabic (ar), bulgarian (bg), german (de), modern greek (el), english (en), spanish (es), french (fr), hindi (hi), italian (it), japanese (ja), dutch (nl)…
LLM-powered applications are susceptible to prompt attacks, which are prompts intentionally designed to subvert the developer’s intended behavior of the LLM. Categories of prompt attacks include prompt injection and jailbreaking: - Prompt Injections are inputs that exploit the concatenation of untrusted data from third parties and users into the context window of a model to get a model to execute unintended instructions. - Jailbreaks are malicious instructions designed to override the safety and security features built into a model. Prompt Guard is a classifier model trained on a large corpus of attacks, capable of detecting both explicitly malicious prompts as well as data that contains…
Paper: SciFive: a text-to-text transformer model for biomedical literature Authors: Long N. Phan, James T. Anibal, Hieu Tran, Shaurya Chanana, Erol Bahadroglu, Alec Peltekian, Grégoire Altan-Bonnet For more details, do check out our Github repo.
roberta-large-mnli is the RoBERTa large model fine-tuned on the Multi-Genre Natural Language Inference (MNLI) corpus. The model is a pretrained model on English language text using a masked language modeling (MLM) objective. Use the code below to get started with the model. The model can be loaded with the zero-shot-classification pipeline like so: You can then use this pipeline to classify sequences into any of the class names you specify. For example: This fine-tuned model can be used for zero-shot classification tasks, including zero-shot sentence-pair classification (see the GitHub repo for examples) and zero-shot sequence classification. The model should not be used to intentionally…