Skip to main content

A framework for federated fine-tuning of retrieval-augmented generation (RAG) systems.

Project description

logo

FedRAG


Linting Unit Testing and Upload Coverage codecov GitHub License GitHub Release DOI Ask DeepWiki

FedRAG is an open-source framework for federated fine-tuning of Retrieval-Augmented Generation (RAG) systems.

Simplified RAG fine-tuning across centralized or federated architectures

Advanced RAG fine-tuning

Comprehensive support for state-of-the-art RAG fine-tuning methods that can be federated with ease.

Work with your tools

Seamlessly integrates with popular frameworks including HuggingFace, LlamaIndex, and LangChain — use the tools you already know.

Lightweight abstractions

Clean, intuitive abstractions that simplify RAG fine-tuning while maintaining full flexibility and control.

Installation

From package managers

# pypi
pip install fedrag

# conda-forge
conda install -c conda-forge fed-rag

[!NOTE] Extras for fed-rag are also available, such as the HuggingFace extra, which can be installed via pip install fed-rag[huggingface]

From source

git clone https://github.com/VectorInstitute/fed-rag.git
cd fed-rag

# install using pip
pip install -e .

# or, install using uv, our package manager tool of choice
uv sync --all-extras --group dev --group docs

Documentation

For more detailed documentation, visit our official documentation site.

[!TIP] This README provides a high-level overview, but our official documentation is updated more frequently with the latest features, tutorials, and API changes. For the most current information, please refer to the documentation site.

Examples

Check out our examples directory for more detailed usage examples:

  • Basic RAG fine-tuning with federated learning
  • Implementing RA-DIT with FedRAG
  • Custom federated aggregation strategies
  • Integration with popular LLM frameworks

Contributing

We welcome contributions! Please see our Contributing Guide for more details.

Citation

If you use FedRAG in your research, please cite our library:

@software{Fajardo_fed-rag_2024,
author = {Fajardo, Andrei and Emerson, David},
doi = {10.5281/zenodo.15092361},
license = {Apache-2.0},
month = mar,
title = {{fed-rag}},
url = {https://github.com/VectorInstitute/fed-rag},
version = {0.0.14},
year = {2025}
}

[!NOTE] The above citation may not reflect the most recent version of the library. We recommend using the Github citation widget (i.e. "Cite this respository") to obtain a citation entry reflecting the latest released version.

License

FedRAG is released under the Apache License 2.0.

Acknowledgements

FedRAG is developed and maintained by the Vector Institute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fed_rag-0.0.14.post2.tar.gz (69.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fed_rag-0.0.14.post2-py3-none-any.whl (72.7 kB view details)

Uploaded Python 3

File details

Details for the file fed_rag-0.0.14.post2.tar.gz.

File metadata

  • Download URL: fed_rag-0.0.14.post2.tar.gz
  • Upload date:
  • Size: 69.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fed_rag-0.0.14.post2.tar.gz
Algorithm Hash digest
SHA256 a13248605f4c04956270f286d53872fae7c0973f85bb91b772e4192c056a9b38
MD5 c6a7e012ea95855172b1581738fdff0c
BLAKE2b-256 f1bed506772ce725bea7cf4b43ed6af7db2cc5d2219e4633e149dacb31e8a1fe

See more details on using hashes here.

File details

Details for the file fed_rag-0.0.14.post2-py3-none-any.whl.

File metadata

  • Download URL: fed_rag-0.0.14.post2-py3-none-any.whl
  • Upload date:
  • Size: 72.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fed_rag-0.0.14.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6c183120a57b685488d5845c654f07acd0871f2dec7a1d9842d8ab96069466d
MD5 63e75a1043cfe4e7ba407b85dc2bd539
BLAKE2b-256 bd3f4c50cc3856646c32c70f26735068a1b813a2f91d9da062b389e5cd8fda95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page