Flower Examples Documentation#

Welcome to Flower Examples’ documentation. Flower is a friendly federated learning framework.

Join the Flower Community#

The Flower Community is growing quickly - we’re a friendly group of researchers, engineers, students, professionals, academics, and other enthusiasts.

Join us on Slack

Quickstart Examples#

Flower Quickstart Examples are a collection of demo projects that show how you can use Flower in combination with other existing frameworks or technologies.

Title

Framework

Dataset

Tags

Flower Clients in C++ (under development)

C++

Synthetic

quickstart, linear regression, tabular

Flower Example using fastai

fastai

MNIST

quickstart, vision

Federated HuggingFace Transformers using Flower and PyTorch

transformers

IMDB

quickstart, llm, nlp, sentiment

JAX: From Centralized To Federated

JAX

Synthetic

quickstart, linear regression

Flower Example using TensorFlow/Keras + MLCube

mlcube, tensorflow, Keras

MNIST

quickstart, vision, deployment

Flower Example using MLX

MLX

MNIST

quickstart, vision

Flower Example using MONAI

MONAI

MedNIST

quickstart, medical, vision

Flower Example using Pandas

pandas

Iris

quickstart, tabular, federated analytics

Flower Example using PyTorch

torch, torchvision

CIFAR-10

quickstart, vision, fds

Flower Example using PyTorch Lightning

lightning

MNIST

quickstart, vision, fds

Flower Example using scikit-learn

scikit-learn

Iris

quickstart, tabular, fds

Flower TabNet Example using TensorFlow

tabnet

Iris

quickstart, tabular

Flower Example using TensorFlow/Keras

tensorflow

CIFAR-10

quickstart, vision, fds

Flower Example using XGBoost

xgboost

HIGGS

quickstart, classification, tabular

Advanced Examples#

Advanced Examples are mostly for users that are both familiar with Federated Learning but also somewhat familiar with Flower’s main features.

Other Examples#

Flower Examples are a collection of example projects written with Flower that explore different domains and features. You can check which examples already exist and/or contribute your own example.

Title

Framework

Dataset

Tags

Flower Android Example (TensorFlowLite)

Android, Java, TensorFlowLite

CIFAR-10

mobile, vision, sdk

Flower Android Client Example with Kotlin and TensorFlow Lite 2022

Android, Kotlin, TensorFlowLite

CIFAR-10

mobile, vision, sdk

Flower App (PyTorch) 🧪

torch, torchvision

CIFAR-10

basic, vision, fds

Secure aggregation with Flower (the SecAgg+ protocol) 🧪

numpy

basic, vision, fds

Flower Example using Custom Metrics

tensorflow

CIFAR-10

basic, vision, fds

Using custom mods 🧪

wandb, tensorboard

CIFAR-10

mods, monitoring, app

Federated Learning on Embedded Devices with Flower

torch, tensorflow

CIFAR-10, MNIST

basic, vision, fds

Flower Example using KaplanMeierFitter

lifelines

Waltons

estimator, medical

Example of Flower App with DP and SA

torch, torchvision

MNIST

basic, vision, fds

Flower Example on Adult Census Income Tabular Dataset

scikit-learn, torch

Adult Census Income

basic, tabular, fds

30-minute tutorial running Flower simulation with PyTorch

torch

CIFAR-10

colab, vision, simulation

Flower Simulation Step-by-Step

torch

MNIST

basic, vision, simulation

Leveraging Flower and Docker for Device Heterogeneity Management in Federated Learning

Docker, tensorflow

CIFAR-10

deployment, vision, tutorial

FLiOS - A Flower SDK for iOS Devices with Example

Swift

MNIST

mobile, vision, sdk

LLM FlowerTune: Federated LLM Fine-tuning with Flower

PEFT, torch

Alpaca-GPT4

llm, nlp, LLama2

Training with Sample-Level Differential Privacy using Opacus Privacy Engine

opacus, torch

CIFAR-10

dp, security, fds

Flower Example for Federated Variational Autoencoder using Pytorch

torch, torchvision

CIFAR-10

basic, vision, fds

PyTorch: From Centralized To Federated

torch

CIFAR-10

basic, vision, fds

Flower Simulation example using PyTorch

torch, torchvision

MNIST

basic, vision, fds, simulation

Flower Simulation example using TensorFlow/Keras

tensorflow, Keras

MNIST

basic, vision, fds, simulation

Flower Logistic Regression Example using scikit-learn

scikit-learn

MNIST

basic, vision, logistic regression, fds

Training with Sample-Level Differential Privacy using TensorFlow-Privacy Engine

tensorflow

MNIST

basic, vision, fds, privacy, dp

Federated finetuning of a ViT

torch, torchvision

Oxford Flower-102

finetuneing, vision, fds

On-device Federated Finetuning for Speech Classification

transformers, whisper

SpeechCommands

finetuning, speech, transformers