--- datasets: - liuwenhan/reasonrank_data_13k language: - en base_model: - Qwen/Qwen3-4B-Instruct-2507 pipeline_tag: text-ranking --- # QRRanker-BRIGHT QRRanker-BRIGHT is trained using the `reasonrank-131k` training data and provides the full model parameters, tokenizer and custom model implementation used for BRIGHT reranking evaluation. Related dataset: [ReasonRank 13k](https://huggingface.co/datasets/liuwenhan/reasonrank_data_13k). For the main QRRanker method, QR heads, scoring mechanism and model details, please refer to [MindscapeRAG/QRRanker](https://huggingface.co/MindscapeRAG/QRRanker). The implementation and hardware notes below are specific to this BRIGHT release. ## Full Model, Without Layer Truncation **This release retains all 36 transformer layers and the complete model parameters. It does not truncate upper layers that contain no selected QR heads.** Unlike the reference [`modeling_qwen3_qr.py`](https://huggingface.co/MindscapeRAG/QRRanker/blob/main/modeling_qwen3_qr.py) implementation, QRRanker-BRIGHT does not truncate upper layers without selected QR heads. All 36 layers remain in the model and are executed during the forward pass. Selecting the top-16 QR heads for scoring does not remove the other layers or their parameters. No additional QRRanker-specific computational optimizations have been applied to this release. The evaluation uses FP16, FlashAttention 2 and tensor parallelism, but does not introduce layer pruning, early exit or selective-layer scoring optimizations. As a result, the full-model implementation can consume substantial GPU memory and computation, particularly with long inputs and 100 candidate documents. ## Tested Hardware BRIGHT evaluation was run on: - **4 NVIDIA A100 GPUs, each with 40 GB of memory** (TP=4). - **8 NVIDIA A100 GPUs, each with 40 GB of memory** (TP=8). Runs with fewer than four GPUs have not been tested. ## Evaluation Code and Data **Both the BRIGHT evaluation data and evaluation code are available in [`SituatedEmbedding/BRIGHT-DIVER-4B-Top100-QRRanker`](https://huggingface.co/datasets/SituatedEmbedding/BRIGHT-DIVER-4B-Top100-QRRanker).** The dataset repository includes the original BRIGHT queries and labels, DIVER-Retriever-4B top-100 candidate pools, evaluation scripts and reference results. See its [README](https://huggingface.co/datasets/SituatedEmbedding/BRIGHT-DIVER-4B-Top100-QRRanker/blob/main/README.md) for download instructions, environment requirements, data format and evaluation commands. Evaluation uses the original BRIGHT queries, top-16 QR heads, a maximum input length of 65,536 tokens and no calibration. This is fixed-pool reranking, not full-corpus retrieval. ## Loading Model code is provided in `custom_modeling_qwen3_new.py` and `custom_cache_new.py`. The evaluation explicitly imports the custom `Qwen3Model` and calls `Qwen3Model.from_pretrained(...)`. Use the evaluation entry point or explicitly import the custom model class. The model configuration does not register an `auto_map`, so `AutoModel.from_pretrained(..., trust_remote_code=True)` alone does not select the custom QRRanker implementation.