Metadata-Version: 2.4
Name: fed-rag
Version: 0.0.21
Summary: Simplified fine-tuning of retrieval-augmented generation (RAG) systems.
Project-URL: Documentation, https://vectorinstitute.github.io/fed-rag/
Project-URL: Repository, https://github.com/VectorInstitute/fed-rag
Project-URL: Issues, https://github.com/VectorInstitute/fed-rag/issues
Project-URL: Changelog, https://github.com/VectorInstitute/fed-rag/blob/main/CHANGELOG.md
Author-email: Andrei Fajardo <andrei.fajardo@vectorinstitute.ai>, David Emerson <david.emerson@vectorinstitute.ai>
Maintainer-email: Andrei Fajardo <andrei.fajardo@vectorinstitute.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: deep learning,federated learning,llms,machine learning,rag,retrieval,semantic search
Requires-Python: <4.0,>=3.10
Requires-Dist: datasets>=3.1.0
Requires-Dist: flwr>=1.18.0
Requires-Dist: pyarrow>=19.0.1
Requires-Dist: pydantic-settings>=2.7.1
Requires-Dist: pydantic>=2.10.5
Requires-Dist: torch>=2.5.1
Requires-Dist: torchvision>=0.20.1
Requires-Dist: typing-extensions>=4.12.2
Provides-Extra: huggingface
Requires-Dist: peft>=0.14.0; extra == 'huggingface'
Requires-Dist: sentence-transformers>=3.4.1; extra == 'huggingface'
Requires-Dist: transformers>=4.49.0; extra == 'huggingface'
Provides-Extra: huggingface-evals
Requires-Dist: datasets>=3.1.0; extra == 'huggingface-evals'
Provides-Extra: llama-index
Requires-Dist: llama-index-core>=0.12.35; extra == 'llama-index'
Provides-Extra: qdrant
Requires-Dist: grpcio>=1.71.0; extra == 'qdrant'
Requires-Dist: qdrant-client[fastembed]>=1.14.2; extra == 'qdrant'
Provides-Extra: unsloth
Requires-Dist: peft>=0.14.0; extra == 'unsloth'
Requires-Dist: sentence-transformers>=3.4.1; extra == 'unsloth'
Requires-Dist: transformers>=4.49.0; extra == 'unsloth'
Requires-Dist: unsloth>=2024.8; extra == 'unsloth'
Description-Content-Type: text/markdown

<!-- markdownlint-disable-file MD033 MD041 -->

<img src="https://d3ddy8balm3goa.cloudfront.net/vector-fed-rag/logo-dark.svg" width="175" align="right" alt="logo"/>

# FedRAG

---------------------------------------------------------------------------------------

[![Linting](https://github.com/VectorInstitute/fed-rag/actions/workflows/lint.yml/badge.svg)](https://github.com/VectorInstitute/fed-rag/actions/workflows/lint.yml)
[![Unit Testing and Upload Coverage](https://github.com/VectorInstitute/fed-rag/actions/workflows/unit_test.yml/badge.svg)](https://github.com/VectorInstitute/fed-rag/actions/workflows/unit_test.yml)
[![codecov](https://codecov.io/github/VectorInstitute/fed-rag/graph/badge.svg?token=JjJBPckP8v)](https://codecov.io/github/VectorInstitute/fed-rag)
![GitHub License](https://img.shields.io/github/license/VectorInstitute/fed-rag)
![GitHub Release](https://img.shields.io/github/v/release/VectorInstitute/fed-rag)
[![DOI](https://zenodo.org/badge/918377874.svg)](https://doi.org/10.5281/zenodo.15092361)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/VectorInstitute/fed-rag)

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

```sh
# 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

```sh
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](https://vectorinstitute.github.io/fed-rag/).

- [Getting Started](https://vectorinstitute.github.io/fed-rag/getting_started/essentials/)
- [Quick Starts](https://vectorinstitute.github.io/fed-rag/getting_started/quick_starts/)
- [Examples](https://vectorinstitute.github.io/fed-rag/examples/)
- [API Reference](https://vectorinstitute.github.io/fed-rag/api_reference/)
- [Glossary](https://vectorinstitute.github.io/fed-rag/glossary/)

> [!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](examples/) 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](CONTRIBUTING.md) for more details.

## Citation

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

```bibtex
@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](LICENSE).

## Acknowledgements

FedRAG is developed and maintained by the [Vector Institute](https://vectorinstitute.ai/).
