Skip to content
Ivelin Ivanov edited this page Nov 16, 2024 · 1 revision

zk0.xyz: Open Source Humanoid Project Leveraging Federated Learning

Introduction

zk0.xyz is where a global community converges to teach a robot new tricks. Instead of the usual tech giant approach, zk0 is about collective intelligence, where your backyard tinkering contributes to the robot's learning.

The zk0 Vision

  • Future of Abundance: It is feasible that in the foreseeable future everyone has a humanoid buddy that makes life simpler and enjoyable. The humanoid robot industry is expected to hit $100 Trillion. zk0 is positioning itself as a grassroots movement in this landscape.

  • Community Driven: Imagine if every coder, engineer, and hobbyist had a hand in building the next big thing in robotics.

  • Privacy by Design: Your data stays with you. zk0's robots learn from what you teach them at home, not from a centralized data behemoth.

Technical Foundations

  • Generative AI: We build on HuggingFace LeRobot which provides foundational AI models and accessible 3D printed components.

  • Collective Learning: We use Flower for Federated Learning which allows your robot to learn locally, then share its knowledge with the world, like a tech version of a book club.

  • Verification Without Violation: Through EZKL zero-knowledge proofs, we ensure trust in the process without needing to know what's on your personal training menu.

How zk0 Functions

  • Everyone's a Teacher: Your environment becomes a classroom for the robot. You teach, and zk0 learns, without anyone else needing to know your exact curriculum.

  • Data Confidentiality: Only the wisdom, not the personal data, gets shared. It's like giving out the recipe for your famous pie, but not the secret ingredient.

  • Open Source Collaboration: This isn't just about contributing; it's about co-owning the future development of robotics.

For the Keen-Eyed

  • Innovation at Scale: With a distributed model, zk0 grows smarter without the need for a monolithic infrastructure.

  • Community as Innovation: A worldwide network of brains can be more innovative and less costly than traditional R&D departments.

  • A Robotics Revolution: zk0 aims to make advanced robotics accessible, turning the tech from exclusive to inclusive.

Demonstrating the Concept

In the following example, we will federate the training of a Diffusion policy on the PushT dataset. The data will be downloaded and partitioned using Flower Datasets. This example runs best when a GPU is available.

rollout_20241109-080456.mp4

Set up the project

Clone the project

Start by cloning the example project. We prepared a single-line command that you can copy into your shell which will checkout the example for you:

git clone https://github.com/ivelin/zk0
cd federate

This will create a new directory called quickstart-lerobot containing the following files:

quickstart-huggingface
├── lerobot_example
│   ├── __init__.py
│   ├── client_app.py   # Defines your ClientApp
│   ├── server_app.py   # Defines your ServerApp
│   └── task.py         # Defines your model, training and data loading
├── pyproject.toml      # Project metadata like dependencies and configs
└── README.md

Install dependencies and project

Install the dependencies defined in pyproject.toml as well as the lerobot_example package.

pip install -e .

Run the Example

You can run your Flower project in both simulation and deployment mode without making changes to the code. If you are starting with Flower, we recommend you using the simulation mode as it requires fewer components to be launched manually. By default, flwr run will make use of the Simulation Engine.

Run with the Simulation Engine

Tip

This example runs faster when the ClientApps have access to a GPU. If your system has one, you can make use of it by configuring the backend.client-resources component in pyproject.toml. If you want to try running the example with GPU right away, use the local-simulation-gpu federation as shown below.

# Run with the default federation (CPU only)
flwr run .

Run the project in the local-simulation-gpu federation that gives CPU and GPU resources to each ClientApp. By default, at most 4xClientApp (using ~1 GB of VRAM each) will run in parallel in each available GPU. Note you can adjust the degree of paralellism but modifying the client-resources specification.

# Run with the `local-simulation-gpu` federation
flwr run . local-simulation-gpu

You can also override some of the settings for your ClientApp and ServerApp defined in pyproject.toml. For example

flwr run --run-config "num-server-rounds=5 fraction-fit=0.1"

This practical example shows that zk0 isn't just theoretical musings; it's tangible progress in collaborative AI training.

The Path Forward

  • Diversify and Expand: The more varied the learning experience, the smarter the robot becomes.

  • Beyond Basics: We're pushing for robots that can handle complex tasks, not just simple greetings.

  • Market Engagement: While rooted in community, zk0 eyes the potential for broader market applications.

Challenges and Considerations

  • Scalability: Maintaining efficiency with growing community.
  • Hardware Accessibility: Ensuring broad participation.
  • Ethical Governance: Guiding the project with ethical principles.

Conclusion

zk0.xyz is redefining AI development by fostering a collaborative, ethical environment for robotics. It's an invitation for anyone interested in shaping the future of technology through community-driven, privacy-respecting innovation. Check out zk0.xyz to participate or follow the project's evolution.

Call to Action Join zk0 today. Whether you're coding, researching, or just curious about AI, your contribution can help define the next generation of robotics. Explore the quickstart example, contribute, or simply stay updated on this journey at zk0.xyz.