whatisgithub

What is flower?

flwrlabs/flower — explained in plain English

Analysis updated 2026-06-24

6,896PythonAudience · researcherComplexity · 4/5Setup · moderate

In one sentence

A Python framework for federated learning that trains AI models across many devices or computers without ever moving private data to a central server, supporting PyTorch, TensorFlow, Hugging Face, mobile devices, and more.

Mindmap

mindmap
  root((Flower))
    What it does
      Federated learning
      Privacy-preserving AI
      Distributed training
    Supported libraries
      PyTorch
      TensorFlow
      Hugging Face
      JAX
    Device support
      Server clusters
      Android phones
      iOS devices
    Features
      Custom strategies
      Research baselines
      Active community
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Train a medical AI model across multiple hospitals without any patient records leaving each institution's servers

USE CASE 2

Run federated learning experiments on Android and iOS phones using on-device data without uploading it

USE CASE 3

Reproduce a published federated learning research paper quickly using Flower's pre-built baseline implementations

USE CASE 4

Build a privacy-preserving recommendation system that improves from user behavior without centralizing personal data

What is it built with?

PythonPyTorchTensorFlowJAX

How does it compare?

flwrlabs/flowerxuehaipan/nvitophugapi/hug
Stars6,8966,8956,893
LanguagePythonPythonPython
Setup difficultymoderateeasyeasy
Complexity4/52/52/5
Audienceresearcherdatadeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires choosing a compatible ML library such as PyTorch or TensorFlow before setting up clients and a server.

So what is it?

Flower is a Python framework for building federated AI systems. Federated learning is a way to train AI models across many different computers or devices without ever moving the raw data to a central location. Instead, each device trains on its own local data, and only the learned updates get shared. This matters a lot for situations where data is sensitive, like medical records or personal phone data, because the original information never leaves its source. The project was started at the University of Oxford and is designed to be flexible enough for both research experiments and real-world applications. You can connect Flower to almost any popular machine learning library, including PyTorch, TensorFlow, Hugging Face, scikit-learn, JAX, and many others. It also supports working with mobile devices like Android and iOS, which means you can run federated training directly on phones. The codebase is organized around a few priorities. It is meant to be customizable, so different teams can adjust it to fit very different situations. It is built to be extended, meaning researchers can swap in new components to test new ideas. And it is written to stay readable and well-maintained, which the project treats as important for a community that wants to both use and contribute to the code. Flower comes with a set of community-contributed baselines, which are pre-built reproductions of well-known federated learning research papers. These let researchers quickly test whether a new idea improves on existing approaches without having to rebuild the comparison from scratch. There are also many quickstart code examples showing how to connect Flower with different libraries and run a training job. A tutorial series walks through the core ideas step by step, starting with what federated learning actually is, then moving on to strategies, customization, and communication between the central server and the individual devices doing the training. The framework is open source and has an active Slack community for questions and discussion.

Copy-paste prompts

Prompt 1
Using Flower, set up a federated learning experiment where 10 simulated clients each train a PyTorch image classifier on their local data and send updates to a central aggregation server.
Prompt 2
Show me how to implement a custom federated averaging strategy in Flower that weights each client's update by the size of their local dataset instead of treating all clients equally.
Prompt 3
How do I connect real Android devices to a Flower server so the model trains on on-device data without any raw data leaving the phone?
Prompt 4
In Flower, reproduce the FedAvg baseline from a paper, what commands do I run, what configuration file do I write, and how do I log the accuracy per round?
Prompt 5
Set up differential privacy in Flower so gradient updates from each client cannot be used to reconstruct their private training data.

Frequently asked questions

What is flower?

A Python framework for federated learning that trains AI models across many devices or computers without ever moving private data to a central server, supporting PyTorch, TensorFlow, Hugging Face, mobile devices, and more.

What language is flower written in?

Mainly Python. The stack also includes Python, PyTorch, TensorFlow.

How hard is flower to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is flower for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.