Install
openclaw skills install openclaw-gpu-bridgeOffload GPU-intensive ML tasks (BERTScore, embeddings) to one or multiple remote GPU machines
openclaw skills install openclaw-gpu-bridgeOpenClaw plugin to offload ML tasks (BERTScore + embeddings) to one or many remote GPU hosts.
hosts[]) with:
serviceUrl / url)model / model_type)/status endpoint + batch progress logsgpu_healthgpu_infogpu_status (new in v0.2)gpu_bertscoregpu_embed{
"plugins": {
"@elvatis_com/openclaw-gpu-bridge": {
"hosts": [
{
"name": "rtx-2080ti",
"url": "http://your-gpu-host:8765",
"apiKey": "gpu-key-1"
},
{
"name": "rtx-3090",
"url": "http://your-second-gpu-host:8765",
"apiKey": "gpu-key-2"
}
],
"loadBalancing": "least-busy",
"healthCheckIntervalSeconds": 30,
"timeout": 45,
"models": {
"embed": "all-MiniLM-L6-v2",
"bertscore": "microsoft/deberta-xlarge-mnli"
}
}
}
}
{
"plugins": {
"@elvatis_com/openclaw-gpu-bridge": {
"serviceUrl": "http://your-gpu-host:8765",
"apiKey": "gpu-key",
"timeout": 45
}
}
}
hosts: array of GPU hosts (v0.2)serviceUrl / url: legacy single-host configloadBalancing: round-robin or least-busyhealthCheckIntervalSeconds: host health polling intervaltimeout: request timeout for compute endpointsapiKey: fallback API key for hosts that do not define per-host keymodels.embed, models.bertscore: plugin-side default modelscd gpu-service
pip install -r requirements.txt
uvicorn gpu_service:app --host 0.0.0.0 --port 8765
Default models are warmed on startup:
all-MiniLM-L6-v2microsoft/deberta-xlarge-mnliAdditional models are loaded on-demand and cached in memory.
API_KEY: require X-API-Key for all endpoints except /healthGPU_MAX_CONCURRENT: max parallel jobs (default 2)GPU_EMBED_BATCH: embedding chunk size for progress logging (default 32)MODEL_BERTSCORE: default warm model for BERTScoreMODEL_EMBED: default warm model for embeddingsTORCH_DEVICE: force device (cuda, cpu, cuda:1)GET /healthGET /infoGET /status (queue + active jobs + progress)POST /bertscorePOST /embed/bertscore:
{
"candidates": ["a"],
"references": ["b"],
"model_type": "microsoft/deberta-xlarge-mnli"
}
/embed:
{
"texts": ["hello world"],
"model": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
}
If you expose your GPU service outside LAN, use defense-in-depth:
Pre-shared key auth (required)
API_KEY on serviceapiKey)X-API-KeyTLS/HTTPS (required on public internet)
server {
listen 443 ssl http2;
server_name gpu.example.com;
ssl_certificate /etc/letsencrypt/live/gpu.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/gpu.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8765;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
uvicorn gpu_service:app --host 0.0.0.0 --port 8765 \
--ssl-keyfile /path/key.pem \
--ssl-certfile /path/cert.pem
Optional: WireGuard VPN instead of public exposure
hosts[].urlOperational hardening
npm run build
npm test
TypeScript runs in strict mode.
MIT