A framework for federated fine-tuning of retrieval-augmented generation (RAG) systems.
Project description
FedRAG
FedRAG is a framework for federated fine-tuning of Retrieval-Augmented Generation (RAG) systems, wherein a server and potentially several client nodes share an overall model architecture. Since the model is common to all participants of the system, fine-tuning can be done collaboratively without any of the raw data leaving any of the client nodes. Instead only the model weight updates are shared between the client and the server.
./fed_rag
├── __init__.py
├── base
│ ├── __init__.py
│ ├── loss.py
│ └── models
│ ├── __init__.py
│ ├── generator.py # BaseGeneratorModel
│ ├── rag.py # BaseRAGModel
│ └── retriever.py # BaseRetrieverModel
├── loss
│ ├── __init__.py
│ ├── generator # Losses for generation task
│ │ └── __init__.py
│ └── retriever # Losses for retrieval task
│ └── __init__.py
├── models
│ ├── __init__.py
│ ├── generators # Generator models
│ │ └── __init__.py
│ └── retrievers # Retrieval models
│ └── __init__.py
├── ops # module for running fed system
│ └── __init__.py
└── types
├── __init__.py
├── client.py # Wrapper for flwr.Client
└── server.py # Wrapper for flwr.Server
Getting Started
Contributing
Install the project's dev dependencies:
# while in root directory of project `fed-rag/`
uv sync --all-extras --dev
Install the pre-commit hooks:
pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fed_rag-0.0.6.tar.gz.
File metadata
- Download URL: fed_rag-0.0.6.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73933674f3d923e3a532aa0408d4446b76d616f2055e6a4145c5b2f21d3ae8a1
|
|
| MD5 |
89fb0a82dc743f68dd02a5e391a9e802
|
|
| BLAKE2b-256 |
cabf045448fd2844461caeda99578e6096d96a32f907637e8ad1b3bac0f807e0
|
File details
Details for the file fed_rag-0.0.6-py3-none-any.whl.
File metadata
- Download URL: fed_rag-0.0.6-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fec6dfb4f0efea2c87fa5bf0b6e2896cb23716345243364b939c381e559c5f96
|
|
| MD5 |
0bf5c4b8755e028f5d21386915add567
|
|
| BLAKE2b-256 |
06bf5e0a8efd5f037b9e39ad5a3798c57de4772efa8e8ca6733cee0df298f781
|