Giter Club home page Giter Club logo

cocofl's Introduction

CoCoFL: Communication- and Computation-Aware Federated Learning via Partial NN Freezing and Quantization

Kilian Pfeiffer, Martin Rapp, Ramin Khalili, Jörg Henkel
CoCoFL: Communication- and Computation-Aware Federated Learning via Partial NN Freezing and Quantization
in Transactions on Machine Learning Research (TMLR) 06/2023
https://openreview.net/pdf?id=XJIg4kQbkv

Installation & Dataset Preparation

  • Install requirements with python3 -m pip install -r requirements.txt
  • Datasets CIFAR-10, CIFAR-100, CINIC-10 require no manual downloads
  • For IMDB, parts are already stored in the repository, others are automatically downloaded
  • Files for SHAKESPEARE are already in the repository's data folder
  • For the FEMNIST experiments, it is required to download the inputs and targets from here or here and put them into the data/femnist folder
  • Data for XCHEST is automatically loaded from here

Run FL Experiments

Each run (with specific arguments) creates an folder (run_HASH) with a specific hash of the configuration. If a specific run is run again, the results are overridden. The experiment folder is created at runs/{session_tag}/. Every 25 FL rounds, plots are generated. Alternativly, plots can be generated manually using python3 utils/plots.py --session_tag {SESSION_TAG}

Main experiments from Table 2 in the paper can be run by using

  • python3 main.py --algorithm CoCoFL --network MobileNet --dataset CIFAR10 --data_distribution NONIID --seed 10 --noniid_dirichlet 0.1 --n_rounds 1000 --lr 0.1 --lr_schedule 600 800 --torch_device cuda

FedAvg and Centralized Baselines can be run by using

  • --algorithm FedAvg (full resources)
  • --algorithm FedAvgDropDevices Devices that do not have full resources are dropped from training
  • --algorithm Centralized

Profiling

For profiling with ARM a pip wheel is required that is compiled with the qnnpack quantization backend. For x64, the fbgemm backend is used. python3 profiling.py --network MobileNet --architecture X64 This creates json files in theprofiling folder. The tables used for the experiments are already put in nets/QuanizedNets/{NN-structure}/tables/

cocofl's People

Contributors

k1l1 avatar

Stargazers

Dominik avatar Rafael Teixeira avatar  avatar  avatar  avatar Tobias Klausner avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.