Instructions to use airun-ai/GlanceRAG-MiMo-9B-Reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use airun-ai/GlanceRAG-MiMo-9B-Reranker with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B") model = PeftModel.from_pretrained(base_model, "airun-ai/GlanceRAG-MiMo-9B-Reranker") - Notebooks
- Google Colab
- Kaggle
Glance β MiMo-9B Reranker
One model. Judge, rank, generate.
The generator is its own reranker. All k retrieved passages are prefilled once into a shared state; one short probe per passage ("Does Passage i answer the query?") continues from the state's cache, and a pointer head returns p(relevant) for every passage at once. With the adapter switched off, the same backbone answers as an ordinary chat model, so no separate reranker is served.
This repository holds a rank-16 LoRA adapter and a 256-d pointer head for XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B, warm-started from airun-ai/MiMo-V2.6-Distill-Qwen-9B-Decision, trained for 39 minutes on one B200 with 4,000 MS MARCO queries (BM25 hard negatives, 8β20 passages per record) in the packed format, then 14 more minutes on 450 records with 20β80 passages (trained-long, the adapter in the repository root). The 39-minute checkpoint used for the paper's HotpotQA and three-mode experiments is in checkpoints/msmarco-short/. It is not a standalone model.
Paper: Glance: The Generator Is Its Own Reranker (Adilet Metinov, Chingiz Arziev; Airun Intelligence Labs, 2026). arXiv: 2610.40454.
Results (BM25 top-20, nDCG@10)
| Method | SciFact (300 q) | NFCorpus (323 q) |
|---|---|---|
| BM25 | 0.662 | 0.306 |
| bge-reranker-v2-m3 | 0.721 | 0.326 |
| Decision 9B zero-shot, 20 separate calls | 0.729 | 0.323 |
| Glance zero-shot, one pass | 0.715 | 0.341 |
Glance trained (checkpoints/msmarco-short), one pass |
0.741 | 0.345 |
| Glance trained-long (this adapter), one pass | 0.749 | 0.346 |
Scaling (SciFact, 100 queries, 100-word passages): at k=100 candidates (21.6k tokens) in one pass, this adapter reaches nDCG@10 0.697 vs 0.637 for bge-reranker-v2-m3 on the same candidates (1.05 s per query on a B200), and at k=200 (43k tokens, chunked probe batches) 0.717 vs 0.659.
HotpotQA distractor, 300 questions (checkpoints/msmarco-short), same 9B generator answering from the top-3: context selected by this adapter gives F1 0.729 vs 0.684 for bge-reranker-v2-m3 (adapter off while answering; +0.045, 95% CI [+0.014, +0.076]) and recalls more gold paragraphs (R@2 0.897 vs 0.863).
One resident backbone serves base chat, the general decision adapter and this reranking adapter, switched per request in about 10 ms, with outputs bit-identical to each loaded alone (16.85 GiB total).
Use
python -m pip install -r requirements.txt
python -m pip install --no-deps triton==3.8.0
Rerank and answer with one backbone (code/glance_rag.py):
from huggingface_hub import snapshot_download
from code.glance_rag import Glance
rag = Glance(snapshot_download("airun-ai/GlanceRAG-MiMo-9B-Reranker")) # local dir of this repo
scores = rag.rerank(query, passages) # one packed forward pass, adapter on
answer = rag.answer(query, passages, top_n=3) # same weights, adapter off
An activated variant (adapter only on probe tokens, exact base-model chat, answer generated from the reranking cache) is at airun-ai/GlanceRAG-MiMo-9B-Reranker-Activated. A vLLM prototype serving chat and decisions in one engine is in code/vllm_proto/.
Evaluation scripts: code/e1_rerank.py (BEIR reranking modes), code/e4_hotpot.py (HotpotQA end to end), code/multi_mode.py (three modes on one backbone), code/toggle_test.py (real-time on/off switching), code/make_train.py (training records), code/e5_scaling.py (k scaling, batching), code/e6_order.py (order sensitivity). Training uses the Kev runtime (python -m kev.train, see training_config.json).
Limitations
Proof of concept: small evaluation sets, one backbone family. Latency is from an unoptimised eager path; a cross-encoder is faster per query (24β60 ms vs ~270β420 ms on a B200). Trained on MS MARCO; review the MS MARCO terms of use for your application. Memory currently grows with k Γ context length (56 GiB at k=100); k=200 does not fit in one call and runs on Kev's chunked path (15.8 s per query).
Citation
@misc{metinov2026glance,
title = {Glance: The Generator Is Its Own Reranker},
author = {Metinov, Adilet and Arziev, Chingiz},
year = {2026},
eprint = {2610.40454},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2610.40454}
}
License: Apache-2.0. See LICENSE and NOTICE; redistributions must retain the NOTICE attribution.
- Downloads last month
- 18
Model tree for airun-ai/GlanceRAG-MiMo-9B-Reranker
Base model
Qwen/Qwen3.5-9B-Base