Federated-Learning-in-PyTorch  by vaseline555

PyTorch implementations of federated learning algorithms for research

created 4 years ago
448 stars

Top 66.9% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive PyTorch implementation of various Federated Learning (FL) algorithms, designed to facilitate research and experimentation. It supports a wide range of datasets, models, and statistical heterogeneity simulations, making it a valuable tool for researchers in distributed machine learning.

How It Works

The framework offers a flexible architecture for implementing FL algorithms. It supports automatic downloading and preprocessing of datasets from torchvision, torchtext, and the LEAF benchmark, simplifying experimental setup. The implementation allows for various statistical heterogeneity simulations, including IID, unbalanced, and Dirichlet-based non-IID distributions, crucial for realistic FL scenarios. A diverse selection of models, from simple logistic regression to complex CNNs and Transformers, are integrated, along with popular FL algorithms like FedAvg, FedProx, and FedOpt variants.

Quick Start & Requirements

  • Install dependencies from requirements.txt. A dedicated environment (conda or Docker) is recommended.
  • Ensure PyTorch and related packages (torchvision, torchaudio, torchtext) are compatible versions. Example: conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 torchtext==0.13.0 cudatoolkit=11.6 -c pytorch -c conda-forge.
  • Configuration and example commands are available via python3 main.py -h and the commands directory.
  • Official PyTorch installation guide: https://pytorch.org/get-started/locally/

Highlighted Details

  • Supports a broad spectrum of datasets, including image, text, tabular, and temporal data, with automatic downloading.
  • Implements multiple statistical heterogeneity simulation methods for realistic FL research.
  • Integrates a wide array of models, from simple linear models to advanced architectures like MobileViT and DistilBERT.
  • Offers various FL algorithms, including FedAvg, FedProx, and adaptive optimization methods (FedAdam, FedYogi).

Maintenance & Community

Feedback is encouraged via the GitHub issue tab.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial or closed-source integration.

Limitations & Caveats

The project is geared towards research and may require further adaptation for production environments. Some FL algorithms and lightweight models for cross-device settings are listed as future work.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), Simon Mo Simon Mo(Core Maintainer of vLLM), and
5 more.

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
created 10 months ago
updated 4 weeks ago
Starred by Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake) and Collin Burns Collin Burns(MTS at Anthropic; Author of MMLU).

pytorch_image_classification by hysts

0%
1k
PyTorch image classification for various datasets (CIFAR, MNIST, ImageNet)
created 7 years ago
updated 3 years ago
Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

serve by pytorch

0.1%
4k
Serve, optimize, and scale PyTorch models in production
created 5 years ago
updated 1 week ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Shizhe Diao Shizhe Diao(Research Scientist at NVIDIA; Author of LMFlow), and
4 more.

tianshou by thu-ml

0.3%
9k
PyTorch RL library for algorithm development and application
created 7 years ago
updated 1 week ago
Feedback? Help us improve.