Chatbots like ChatGPT lie on a centralized server. A federated AI chat bot distributes the learning on multiple PCs, but models are still inside silos. The mycelium goes a step further: here, AI models can freely travel across the web as agents.
It is realized by adding another protocol layer on top of that of federated AI:
More concretely, it realizes the mycelium layer with a protocol that makes use of JavaScript/Python, a communication protocol like AcitivtyPub and evolutionary algorithms. The concrete implemenation of this is described in the so-called SPORE-protocol. Based on that, it builds on top of federated, peer-to-peer AI training, e.g. flower.ai and knowledge graphs, which are used to link to other learning groups.
For more background-information about the project's mission statement, see the Wiki.
- Python 3.8+
- Pip (Python package manager)
- Running RDF Knowledge Graph server (e.g., Fuseki)
- Mastodon account + API token
git clone https://github.com/bluebbberry/BabyFungus.git
cd babyfungus
Set up a virtual environment (optional but recommended) and install the dependencies:
python3 -m venv venv
source venv/bin/activate # Linux/MacOS
# or
venv\Scripts\activate # Windows
pip install -r requirements.txt
- RDF Knowledge Graph: Make sure your Fuseki server is running and update the URLs in the .env-file (e.g.,
FUSEKI_SERVER_URL
). - Mastodon API: Create a Mastodon API token and setup the connection in the .env-file (
MASTODON_API_KEY
,MASTODON_INSTANCE_URL
,ACCOUNT_NAME
).
To start everything, run in the /src
-folder:
python main.py
The system will:
- Train the model every five seconds.
- Post updates to Mastodon.
- Respond to Mastodon requests (e.g., for predictions).
- Share gradients and aggregate other groups' models using the RDF graph to potentially switch groups.
Now your system is running, and you can interact with it on Mastodon by posting to #babyfungus
. Ask for recommendations to a song you like and the system will respond.
MIT License. See LICENSE file for details.