Flower Examples Documentation¶

Welcome to Flower Examples’ documentation. Flower is a friendly federated AI 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

Federated Learning with fastai and Flower (Quickstart Example)

fastai

MNIST

quickstart, vision

Federated Learning with HuggingFace Transformers and Flower (Quickstart Example)

transformers

IMDB

quickstart, llm, nlp, sentiment

Federated Learning with JAX and Flower (Quickstart Example)

JAX, FLAX

Synthetic

quickstart, linear regression

Flower Example using TensorFlow/Keras + MLCube

mlcube, tensorflow, Keras

MNIST

quickstart, vision, deployment

Federated Learning with MLX and Flower (Quickstart Example)

MLX

MNIST

quickstart, vision

Federated Learning with MONAI and Flower (Quickstart Example)

MONAI

MedNIST

quickstart, medical, vision

Federated Learning with Pandas and Flower (Quickstart Example)

pandas

Iris

quickstart, tabular, federated analytics

Federated Learning with PyTorch and Flower (Quickstart Example)

torch, torchvision

CIFAR-10

quickstart, vision, fds

Federated Learning with PyTorch Lightning and Flower (Quickstart Example)

lightning

MNIST

quickstart, vision, fds

Federated Learning with scikit-learn and Flower (Quickstart Example)

scikit-learn

Iris

quickstart, tabular, fds

Flower TabNet Example using TensorFlow

tabnet

Iris

quickstart, tabular

Federated Learning with Tensorflow/Keras and Flower (Quickstart Example)

tensorflow

CIFAR-10

quickstart, vision, fds

Federated Learning with XGBoost and Flower (Quickstart Example)

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

Custom Metrics for Federated Learning with TensorFlow and Flower

tensorflow, scikit-learn

CIFAR-10

basic, vision, fds

Using custom mods 🧪

wandb, tensorboard

CIFAR-10

mods, monitoring, app

Federated AI with Embedded Devices using Flower

torch

Fashion-MNIST

basic, vision, embedded

Federated Survival Analysis with Flower and KaplanMeierFitter

lifelines

Waltons

estimator, medical

Flower Example on MNIST with Differential Privacy and Secure Aggregation

torch, torchvision

MNIST

DP, SecAgg, 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

Fashion-MNIST

vision, simulation, video-tutorial

Leveraging Flower and Docker for Device Heterogeneity Management in Federated Learning

Docker, tensorflow

CIFAR-10

deployment, vision, tutorial

FlowerTune LLM: Federated LLM Fine-tuning with Flower

PEFT, torch

Alpaca-GPT4

llm, nlp, LLama

Federated Finetuning of a Vision Transformer with Flower

torch, torchvision

Oxford Flower-102

finetuning, vision, fds

FLiOS - A Flower SDK for iOS Devices with Example

Swift

MNIST

mobile, vision, sdk

Training with Sample-Level Differential Privacy using Opacus Privacy Engine

opacus, torch

CIFAR-10

DP, DP-SGD, basic, vision, fds, privacy

Federated Variational Autoencoder with PyTorch and Flower

torch, torchvision

CIFAR-10

basic, vision, fds

PyTorch: From Centralized To Federated

torch

CIFAR-10

basic, vision, fds

Flower Logistic Regression Example using scikit-learn and Flower (Quickstart Example)

scikit-learn

MNIST

basic, vision, logistic regression, fds

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

tensorflow

MNIST

DP, DP-SGD, basic, vision, fds, privacy

On-device Federated Finetuning for Speech Classification

transformers, whisper

SpeechCommands

finetuning, speech, transformers