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.8.tar.gz (36.5 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.8-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file fed_rag-0.0.8.tar.gz.

File metadata

  • Download URL: fed_rag-0.0.8.tar.gz
  • Upload date:
  • Size: 36.5 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.8.tar.gz
Algorithm Hash digest
SHA256 2cbf90dda42f6d69366c77fbc297e0ad41107a4b861c665ab935be55557fc85b
MD5 db32dc5b56b16b87f6cdc0b250dc2afd
BLAKE2b-256 b240825c4c8abc5f799530efd79744c991fafcfc0f1f5dab2e9688cebaa093fe

See more details on using hashes here.

File details

Details for the file fed_rag-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: fed_rag-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 39.2 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e824bdc47c98cdefb13ed3e7eacb462262f52732fe90c47376ab7d6a67c47e47
MD5 b793c003194a42f59530f02377fb718f
BLAKE2b-256 055bdb4a11edc84155365053b8c8404b649ad2f0e9abcb1e9308ae0b961d8b74

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