Welcome to the RL-Swarm setup guide! This walkthrough helps you install and run the project from scratch, restore your key, activate the virtual environment, and expose your local service using tunnels.
- β
swarm.pemkey (backed up) - β
Git, Python(3.10 min),
screen, andnpminstalled - β GPU (3090, 4090, or β₯24GB VRAM recommended)
- β CPU (arm64 or x86 CPU with minimum 32gb ram (note that if you run other applications during training it might crash training)
Secure your existing swarm.pem key:
cp $HOME/rl-swarm/swarm.pem $HOME/Remove old project and clone fresh:
cd $HOME && \
rm -rf rl-swarm && \
git clone https://github.com/xailong-6969/rl-swarm.gitPlace the key back into the new repo:
cp $HOME/swarm.pem $HOME/rl-swarm/π‘ Tip: Use your file explorer or
lsto verify its placement.
Start a persistent session:
cd $HOME/rl-swarm
screen -S gensynFor systems with β₯24GB VRAM (e.g. 3090/4090/A100/H100) (Note: only for gpu setups)
sed -i \
-e 's/use_vllm: false/use_vllm: true/' \
-e 's/fp16: false/fp16: true/' \
-e 's/gradient_checkpointing: false/gradient_checkpointing: true/' \
-e 's/num_train_samples: 2/num_train_samples: 1/' \
./rgym_exp/config/rg-swarm.yaml
- Gensyn/Qwen2.5-0.5B-Instruct
- Qwen/Qwen3-0.6B
- nvidia/AceInstruct-1.5B
- dnotitia/Smoothie-Qwen3-1.7B
- Gensyn/Qwen2.5-1.5B-Instruct
Inside the screen session:
python3 -m venv .venv
source .venv/bin/activate
./run_rl_swarm.shWait for the message:
Waiting for localhost:3000...
Now, detach the screen:
Ctrl + A, then DChoose one of the methods below to make your service accessible online:
npm install -g localtunnel
lt --port 3000sudo apt install cloudflared # Ubuntu/Debian
# or
brew install cloudflared # macOS
cloudflared tunnel --url http://localhost:3000Open the URL in your browser to access your service.
To resume your running session:
screen -r gensynYour RL-Swarm instance is now running, and you can interact with it either locally or via the exposed tunnel.