Connect your node to the network

Workers perform real local LLM inference and earn MLC when their output matches network consensus. Setup takes about five minutes on a machine with Python 3.10+ and Ollama installed.

Requirements

Python 3.10+

Required to run the worker process and socket protocol client.

Ollama

Local LLM runtime. Install from ollama.com and pull a model.

TCP access to coordinator

Default host 127.0.0.1, port 9600. Adjust for remote coordinators.

Compute headroom

Small models (1B params) run on CPU. Larger models benefit from GPU acceleration.

Quick start

Option A — Web dashboard (recommended)

Starts the coordinator, workers, and a live network graph in one command.

cd connection-layer
pip install -r requirements.txt
python3 web.py --workers 10

Open http://127.0.0.1:5051 to watch workers connect and submit test prompts.

Option B — Join as an independent worker

Run your own worker process and connect to an existing coordinator.

1
Install and start Ollama
ollama serve
ollama pull llama3.2:1b
2
Start the coordinator

In a separate terminal, from the connection-layer/ directory:

python3 coordinator.py
3
Register your worker

Choose a unique worker ID and connect:

cd connection-layer
python3 worker.py --id worker-01

Additional flags: --host, --port, --model, --ollama-url

4
Confirm registration

You should see connected to coordinator at 127.0.0.1:9600. Submit a prompt from the dashboard or CLI:

python3 client.py "What is decentralized inference?"

Protocol overview

Workers communicate with the coordinator using JSON-line messages over TCP.

MessageDirectionPurpose
registerworker → coordinatorJoin the network
registeredcoordinator → workerAcknowledge worker
taskcoordinator → workerInference assignment
resultworker → coordinatorInference output + timing
promptclient → coordinatorUser request
task_completecoordinator → clientConsensus response + rewards

Configuration

Flag / envDefaultDescription
--host127.0.0.1Coordinator host
--port9600Coordinator port
--modelllama3.2:1bOllama model per worker
--reward10.0Base reward pool per task
WORKERS10Workers started by run_demo.sh

Troubleshooting

!
Ollama not reachable
ollama serve
ollama pull llama3.2:1b
!
No workers connected

Start workers before submitting prompts, or use ./run_demo.sh in connection-layer.

!
Slow first response

First inference loads the model into memory. Subsequent tasks are faster.

Worker running?

Check the live network graph to see your node online and earning MLC.

Open dashboard