Text Worker
The Grid text worker is a sidecar for an inference backend you already run. It supports Ollama, vLLM, SGLang, LMDeploy, LM Studio, KoboldCpp, and other compatible APIs without taking custody of your model files.
Completed accepted work records den work units used in the current hourly AIPG payout split. Den is not currency and there is no guaranteed request volume, fixed exchange rate, or earnings amount.
No worker bond is required today. Worker bonding and slashing remain planned; their production policy is not finalized or active.
How It Fits
- Your Ollama or OpenAI-compatible backend serves a model.
- The worker connects outbound to the Grid over WebSocket.
- Core sends only jobs compatible with the advertised model.
- The worker calls your backend and streams the result to Core.
- Accepted completion contributes to your payout-period share.
The worker does not install or control your backend. It may help an Ollama user pull a model only after an explicit local action.
Requirements
- A supported operating-system release shown at aipowergrid.io/run.
- A running Ollama or OpenAI-compatible backend.
- Enough RAM, VRAM, and disk for the model you choose.
- A Grid account for approving the worker-scoped connection.
Model memory varies substantially with architecture, context length, quantization, and backend settings. Treat model publishers and your backend’s own memory report as authoritative; a model parameter count alone is not a hardware guarantee.
Quick Start
1. Start Your Backend
For Ollama, install it from the official download page, start it, and confirm the chosen model appears:
ollama listFor vLLM, SGLang, LMDeploy, LM Studio, or KoboldCpp, start the local API you already use and note its endpoint.
2. Download the Verified Worker
Use aipowergrid.io/run. That page exposes only platform artifacts that pass the current immutable release-manifest, checksum, SBOM, and GitHub asset checks. Follow the exact first-run command shown for the selected artifact.
3. Complete the Local Wizard
The worker opens a token-protected local dashboard at
http://localhost:7861. In the wizard:
- Select a detected backend or enter its endpoint.
- Test the endpoint and choose a model it actually serves.
- Review the Grid model name, context, and output limits.
- Open the short-lived Console approval link.
- Approve the exact worker name and worker-only credential.
- Start the worker and wait for the dashboard to report Online.
Console authentication and payout-wallet management happen in Console. The worker never asks for a payout-wallet private key.
4. Verify the Connection
Use the public exact-name check on aipowergrid.io/run after the local dashboard reports Online. A merely running process is not proof that Core accepted its registration.
Supported Backends
| Backend | Local worker path | Notes |
|---|---|---|
| Ollama | Auto-detected | Easiest local setup |
| vLLM | OpenAI-compatible endpoint | High-throughput serving |
| SGLang | OpenAI-compatible endpoint | High-throughput serving |
| LMDeploy | OpenAI-compatible endpoint | Detected on its common port |
| LM Studio | Detected or entered manually | Desktop local server |
| KoboldCpp | Detected or entered manually | Compatible local API |
| Other compatible APIs | Entered manually | Advanced; test before saving |
Backend credentials are stored locally and are not returned by the dashboard API after saving.
Capacity Controls
The worker supports these operator controls:
| Setting | Purpose |
|---|---|
GRID_MAX_THREADS | Maximum simultaneous Grid jobs for a single backend |
GRID_SCHEDULE | Optional local-time availability windows and concurrency |
GRID_MAX_LENGTH | Maximum generated tokens per response |
GRID_MAX_CONTEXT_LENGTH | Maximum accepted context length |
GRID_BACKENDS | Advanced multi-backend configuration with per-backend limits |
Example schedule:
[
{"days":"mon-fri","start":"08:00","end":"18:00","concurrency":1},
{"days":"sat-sun","concurrency":2}
]Outside matching windows, the worker uses GRID_MAX_THREADS. A window with
"concurrency": 0 pauses Grid work. Schedule changes are reevaluated
periodically; scaling down drains or cancels worker connections through the
normal cleanup path.
The local setup wizard and Settings page expose concurrency and the validated local-time schedule. Do not assume a jobs-per-hour, token-per-second, or automatic local-workload-aware rate limiter exists.
Run From Source
Pre-built verified releases are the normal operator path. Developers may run a reviewed checkout from source:
git clone https://github.com/AIPowerGrid/grid-text-worker
cd grid-text-worker
python -m venv .venv
source .venv/bin/activate
pip install -e .
grid-inference-workerEnter credentials only in the token-protected local wizard or protected env file. Do not put a Grid or backend key in a command argument, screenshot, public issue, or support log.
Security Boundary
Community workers receive plaintext prompts and produce plaintext outputs. Do not send secrets or regulated data unless a separately documented confidential-execution route is live and verified.
- The dashboard binds to loopback by default and requires a local token.
- LAN exposure is an explicit operator choice and remains token-protected.
- Model weights stay in the operator’s backend.
- The Grid credential is worker-scoped and cannot spend account credits.
- The payout wallet and its private key do not belong on the worker host.
Troubleshooting
No backend detected: verify the service is running, enter its URL manually, and select Test. Container networking may require a host-gateway address.
No models listed: confirm the backend’s own models endpoint lists or has loaded the model.
The dashboard says running but not Online: check the bounded connection
error and logs. Online requires a valid Core ready response.
No jobs arrive: demand is variable. Check that the advertised model name is valid, the worker is visible publicly, and the operating schedule is not paused.