texttron/tevatron
Tevatron - Unified Document Retrieval Toolkit across Scale, Language, and Modality. Demo in SIGIR 2023, SIGIR 2025.
What it solves
Tevatron is a toolkit for building and using neural information retrieval systems—systems that match queries to documents using deep learning models. It lets researchers and developers train large language models (LLMs) to act as retrievers (finding relevant passages) and rerankers (reordering results), without having to piece together many separate libraries. It handles the heavy lifting of training on GPUs or TPUs, supports different model sizes and data types (text, image, multilingual), and provides ready-to-use datasets and evaluation pipelines.
How it works
Tevatron provides command-line drivers for three main steps: training, encoding, and searching. During training, you give it a model (e.g., Mistral-7B) and a dataset of queries with relevant and irrelevant passages; it fine-tunes the model using techniques like LoRA (parameter-efficient tuning) or full fine-tuning, and can use efficient training tools like DeepSpeed, FlashAttention, and gradient accumulation. After training, you encode your entire corpus (the set of documents) and your queries into dense vectors, then use a built-in search driver to compute similarities and retrieve top results. It also supports cross-encoder rerankers (models that score query-document pairs) and offers integration with vLLM for fast inference and with Megatron-Core for parallel training of very large models, including mixture-of-experts (MoE) models. Data is typically provided as JSONL files matching a simple schema, and several public datasets are automatically downloadable from HuggingFace.
Who it's for
This toolkit is aimed at researchers, engineers, and data scientists working on information retrieval, especially those who want to train large neural retrieval models without building the infrastructure from scratch. It is also useful for people running open-domain question answering or RAG systems that need a custom retriever or reranker. Because it supports both GPU (PyTorch) and TPU (JAX) backends, it appeals to teams with access to different hardware.
Highlights
- Trains billion-scale LLM neural retrievers on GPU and TPU.
- Parameter-efficient fine-tuning with LoRA.
- Integrates with vLLM, DeepSpeed, FlashAttention, and gradient accumulation.
- Self-contained HuggingFace datasets for multimodal and multilingual retrieval and QA.
- Direct loading and fine-tuning of state-of-the-art pretrained models like BGE and Instruct-E5.
- LLM reranker training with Megatron-Core, including expert parallelism for MoE models.
- Unified retrieval and reranker evaluation with HuggingFace and vLLM backends, plus offline teacher annotation for distillation.
Related
- Project
- Project
- Project
- Project
- Project