Skip to main content

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

Project description

FedRAG


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

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


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.6.post4.tar.gz (35.1 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.6.post4-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file fed_rag-0.0.6.post4.tar.gz.

File metadata

  • Download URL: fed_rag-0.0.6.post4.tar.gz
  • Upload date:
  • Size: 35.1 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.6.post4.tar.gz
Algorithm Hash digest
SHA256 ba99157ab03882112b1393f7ab9186f63832aed0ab8ce6d63d6d4d018b7b6b46
MD5 bf480d184df62456ace0f674bbcecaa8
BLAKE2b-256 98b2e80c0d318b7fd78f82659899fd77aa4d4014dfce272a5ca8d6e3683fc799

See more details on using hashes here.

File details

Details for the file fed_rag-0.0.6.post4-py3-none-any.whl.

File metadata

  • Download URL: fed_rag-0.0.6.post4-py3-none-any.whl
  • Upload date:
  • Size: 37.9 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.6.post4-py3-none-any.whl
Algorithm Hash digest
SHA256 a3d899d4d1fc470e9778e022cd7c72c8e46ddd3a3127d17f7b2285713802c615
MD5 64962ac9514a3e5a6e659cef72bc551f
BLAKE2b-256 067f48d70d3ac61b490e41425a71225e04ef0d49e73fd6135de0e6b8ad04b179

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