Back to directory

RAG-Retrieval

A Python framework for end-to-end fine-tuning, inference and distillation of RAG retrieval models, covering embedding, ColBERT-style late-interaction, and reranker models.

RAG-Retrieval

RAG-Retrieval provides end-to-end code for training, inference, and distillation of retrieval-augmented-generation retrieval models. For training, it supports fine-tuning of open-source embedding models (both BERT-based and LLM-based), late-interaction models such as ColBERT, and reranker models (BERT-based and LLM-based). For inference, it focuses on reranking and ships a lightweight companion Python library, rag-retrieval, that provides a single, unified way to call different RAG ranking models.

For distillation, it supports distilling both embedding and reranker models from a larger model down to a smaller one, such as a 0.5-billion-parameter LLM or a BERT-base model. The project has also published research and implementation notes on topics such as positional bias across a full retrieval pipeline, MRL loss for embedding models, and LLM-based reranking distilled into BERT.

It is released under the MIT license.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.