Skip to content

RAGFoundry

A library for fine-tuning LLMs on RAG datasets

Visit official site

What RAGFoundry is

The library is described as a framework that fine-tunes LLMs on RAG-enhanced datasets so they make better use of external information.

What you can do with it

  • Build a dataset that saves RAG interactions
  • Train any model with PEFT
  • Generate predictions with trained or untrained LLMs
  • Run evaluation with custom metrics

Getting started

  • Clone the library to a local environment
  • Edit the config file for the workflow
  • Run processing.py to create the dataset
  • Use training.py to train the model

Additional details

  • The design is modular and easy to extend
  • Workflows are defined in config files
  • Trained models can be pushed to HF Hub

Pros & cons

✓ What we like

  • Workflows are customised through config files
  • Trained models can be pushed to HF Hub

! What to watch out for

  • The workflow starts by cloning the library locally
  • Scripts such as processing.py and training.py drive the steps

FAQ

What training method is used?

The material states parameter-efficient fine-tuning, or PEFT.

Can models be shared?

The material states trained models can be pushed to HF Hub.

Last reviewed: 2026-11-15

More AI coding tools tools

View all →

How we review