P2P Federated Learning (p2pfl) is a decentralized federated learning library, it allows creating basic
federated learning systems on p2p networks using gossip protocols.
Intuitive design makes it easy for anyone to use.
Your data will never leave your device.
Work seamlessly with your team in a collaborative and decentralized environment.
Built for scalability and robustness to handle your growing needs.
1from p2pfl.node import Node
2from p2pfl.learning.pytorch.mnist_examples.mnistfederated_dm import (MnistFederatedDM)
3from p2pfl.learning.pytorch.mnist_examples.models.mlp import MLP
4
5# Create nodes using PyTorch and MNIST dataset
6node1 = Node(
7 MLP(),
8 MnistFederatedDM(),
9)
10node2 = Node(
11 MLP(),
12 MnistFederatedDM(),
13)
14
15# Start nodes
16node1.start()
17node2.start()
18
19# Connect nodes
20node1.connect(node2.addr)
21
22# Start learning
23node.set_start_learning(rounds=2, epochs=1)
Choose the plan that fits your needs.
Web UI
Advanced features
Priority support
Web UI
Advanced features
Priority support
Enter your email to be the first to know when we launch.