swarm-server / README.md
abhimittal's picture
Deploy swarm parameter server
752f957 verified
|
Raw
History Blame Contribute Delete
1.94 kB
metadata
title: Swarm Parameter Server
emoji: 🐝
colorFrom: yellow
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: mit

🐝 Swarm Parameter Server

The Parameter Server for federated "swarm" tuning. It holds the global TinyGPT weights and averages gradients pushed over HTTP by a swarm of workers (Kaggle notebooks, friends' machines, anything that can POST).

Endpoints

Method Path Purpose
GET /health liveness probe
GET /config model + swarm config (workers self-verify)
GET /weights download global weights (safetensors)
POST /gradients upload gradients (safetensors) β†’ aggregated
GET /status version, step, pending, mode, last loss
GET /checkpoint download current weights as a file

Configuration (Space β†’ Settings β†’ Variables and secrets)

Variable Default Meaning
SWARM_AGG_MODE sync sync (average K then step) or async
SWARM_WORLD_SIZE 4 gradients buffered per step in sync mode
SWARM_LR 3e-4 AdamW learning rate
SWARM_STALENESS_TOLERANCE 0 how many versions behind a grad may be
SWARM_TOKEN empty if set, /gradients requires a bearer token

Set SWARM_TOKEN as a secret to stop random internet traffic from poisoning your global model. Gradients are transported as safetensors, so uploads can never execute code.