RL Swarm is a peer-to-peer system for reinforcement learning. It allows you to train models collaboratively with others in the swarm, leveraging their collective intelligence. It is open source and permissionless, meaning you can run it on a consumer laptop at home or on a powerful GPU in the cloud. You can also connect your model to the Gensyn Testnet to receive an on-chain identity that tracks your progress over time.
Recommended Hardware
- 8 core CPU, 32 GB RAM.
OR
- CUDA devices (officially supported):
- RTX 3090
- RTX 4090
- RTX 5090
- A100
- H100
sudo apt update && sudo apt upgrade -y
sudo apt install npm screen curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
sudo apt install python3 python3-pip python3-venv python3-dev -ysudo apt update
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
sudo apt install -y nodejs
node -vnpm install -g yarn
yarn -vgit clone https://github.com/gensyn-ai/rl-swarm && cd rl-swarmCreate screen session
screen -S gensynpython3 -m venv .venv
. .venv/bin/activate
bash run_rl_swarm.shand you need to tunneling http://localhost:3000/ by enter this command
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg \
| tee /usr/share/keyrings/cloudflare-main.gpg >/dev/nullecho "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main" \
| tee /etc/apt/sources.list.d/cloudflared.listsudo apt update
sudo apt install cloudflared -ycloudflared tunnel --url http://localhost:3000you will get url to login
After success login attach swarm screen
screen -r gensynWait untill you see
During setup, you'll be asked if you'd like to participate in the 1. Hugging Face 2. Model . AI Prediction Market.
-
N then ENTER
-
Choose your Model, If you want to use default mode press ENTER Models:
- Qwen/Qwen2.5-Coder-0.5B-Instruct
- Qwen/Qwen2.5-Coder-1.5B-Instruct
If you want to use default mode press ENTER
After this setup you can see your node - Gensyn Testnet Dashboard.
If you are Termius user you can back up swarm.pem with sftp
- Attach screen to check node logs
screen -d -r gensysn- Activate virtual environment
rm -rf .venv && git pull && python3 -m venv .venv && source .venv/bin/activate- Start node
pkill -f rl-swarm || true && bash run_rl_swarm.shRun in swarm directory
If you are inside screen detach your screen first by pressing ctrl a + d
pkill screenCreate new screen session
screen -S gensynIf not inside screen you can skip this step
cd && cd-rl-swarmthen update your node
rm -rf .venv && git stash && git pull && python3 -m venv .venv && source .venv/bin/activate && bash run_rl_swarm.shMake sure to install all dependesies, and create your own tg bot with @botfather and your eoa address.
What is token bot?
- after you create your own bot you'll see your bot token
What is chat id?
- you can get chat id @userinfobot on telegram
what is eoa?
- you can find your eoa : https://dashboard.gensyn.ai/?application=RLSwarm and login using email method, and then you will see green 0xaddress
screen -S gswarmCopy this command box one by one
curl -L go.dev/dl/go1.22.4.linux-amd64.tar.gz | tar -xzf - -C /usr/localecho 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bash_profile
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bash_profilesource ~/.bash_profilego versiongo install github.com/Deep-Commit/gswarm/cmd/gswarm@latestsed -i 's/0xFaD7C5e93f28257429569B854151A1B8DCD404c2/0x7745a8FE4b8D2D2c3BB103F8dCae822746F35Da0/g' $(which gswarm)gswarmand enter your :
- Bot token
- Chat ID
- EOA address
That's All