P2PFL is a general-purpose open-source library designed for the execution (simulated and in real environments) of Decentralized Federated Learning systems, specifically making use of P2P networks and the gossip protocols.
P2PFL offers a range of features designed to make decentralized federated learning accessible and efficient. For detailed information, please refer to our documentation.
| Feature | Description |
|---|---|
| 🚀 Easy to Use | Get started quickly with our intuitive API. |
| 🛡️ Reliable | Built for fault tolerance and resilience. |
| 🌐 Scalable | Leverages the power of peer-to-peer networks. |
| 🧪 Versatile | Experiment in simulated or real-world environments. |
| 🔒 Private | Prioritizes data privacy with decentralized architecture. |
| 🧩 Flexible | Designed to be easy to modify. |
| 📈 Real-time Monitoring | Manage and track experiment through P2PFL Web Services platform. |
| 🧠 ML Frameworks | Seamlessly integrate PyTorch, TensorFlow/Keras, and JAX models. |
| 📡 Communication Protocol Agnostic | Choose the communication protocol that best suits your needs (e.g., gRPC). |
| 🔌 Integrations | Enhanced capabilities through integrations: Hugging Face Datasets, ML frameworks, communication protocols, and Ray for large-scale simulations. |
pip install "p2pfl[torch]"git clone https://github.com/p2pfl/p2pfl.git
cd p2pfl
uv sync --all-extrasNote: The above command installs all dependencies (PyTorch, TensorFlow, and Ray). If you only need specific frameworks, you can use:
uv sync- Install only core dependenciesuv sync --extra torch- Install with PyTorch supportuv sync --extra tensorflow- Install with TensorFlow supportuv sync --extra ray- Install with Ray supportUse
--no-devto exclude development dependencies.
⚠️ Important for Ray users: If you're using Ray, we recommend activating the virtual environment traditionally instead of usinguv runto avoid dependency issues with Ray workers. See the installation guide for details.
docker build -t p2pfl .
docker run -it --rm p2pfl bashTo start using P2PFL, follow our quickstart guide in the documentation.
- Documentation: https://p2pfl.github.io/p2pfl/
- Technical Report: (first version) other/memoria.pdf
We welcome contributions! See CONTRIBUTING.md for guidelines. Please adhere to the project's code of conduct in CODE_OF_CONDUCT.md.
Connect with us and stay updated:
- GitHub Issues: - For reporting bugs and requesting features.
- Google Group: - For discussions and announcements.
- Slack: - For real-time conversations and support.
A big thank you to the community for your interest in P2PFL! We appreciate your support and contributions.
