# TsingZ0/PFLlib

Master Federated Learning in 2 Hours—Run It on Your PC!

Repository: https://github.com/TsingZ0/PFLlib
Canonical: https://ross.abutalabs.com/products/pfllib
Homepage: http://www.pfllib.com/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: non-iid, federated-learning, personalization, pytorch, python, distributed-computing, heterogeneity, differential-privacy, privacy, imagenet, domainnet, iot, attack, dlg, privacy-protection
Last push: 2026-01-25T02:31:48+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 64, release rhythm 28, longevity 100
- inputs: {"age_days": 2191, "days_push": 221, "days_rel": 525, "gap_med": 67.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2155, forks 416 (observed 2026-08-28T04:06:19.562692+00:00)

## What it is
PFLlib is a beginner-friendly Python library and benchmark for traditional and personalized federated learning, offering 39 algorithms, 24 datasets, and privacy evaluation tools built on PyTorch. It is designed to simulate federated learning scenarios with hundreds of clients on a single consumer GPU.

## Use cases
- simulate federated learning experiments on my PC
- compare personalized federated learning algorithms on non-IID data
- evaluate privacy attacks like DLG against federated models
- benchmark federated learning with 500 clients on one GPU
- learn federated learning quickly as a beginner
- test differential privacy in federated training

## When to choose
- you want a comprehensive, easy-to-extend FL library with many algorithms and datasets
- you need to benchmark personalized FL under data heterogeneity
- you have limited GPU resources but need large-scale client simulations

## When to avoid
- you need production federated learning deployment across real devices rather than simulation
- you require model heterogeneity support, for which HtFLlib is the extended project

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, benchmarking, privacy, data-science
- domain: machine-learning, artificial-intelligence, privacy, microservices
- platform: python, cross-platform
- tags: federated-learning, personalized-federated-learning, non-iid-data, differential-privacy, pytorch, benchmark, data-heterogeneity, gpu

## Member repositories
- TsingZ0/PFLlib (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.562692+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:50:36.090410+00:00, confidence not recorded.
  - readme: https://github.com/TsingZ0/PFLlib (fetched 2026-08-28T04:06:19.562692+00:00, sha 2f853cc9b732)
  - homepage: http://www.pfllib.com/ (fetched 2026-08-29T10:30:38.309604+00:00, sha bf10e3ce3f9e)
  - site_page: http://www.pfllib.com/docs.html (fetched 2026-08-29T10:30:38.318695+00:00, sha dedd05d5fd75)
  - site_page: http://www.pfllib.com/about.html (fetched 2026-08-29T10:30:38.320734+00:00, sha 051aff3e9993)
- Data as of 2026-08-30T08:39:29.467469+00:00.
