The Grid

RAYS Studio

RAYS Studio is the desktop daemon that runs the local half of the Grid. It hosts inference through llama.cpp, runs the SB-ZGA fine-tuning loop in the background, and syncs orthogonal deltas with the federation.

Pipeline

  1. Inference & logging. The agent hits the local OpenAI-compatible endpoint; every session is written to ~/.rays/logs/success/.
  2. Local fine-tuning. The daemon ingests logs, builds PyTorch tensors, and trains an SB-ZGA adapter on MPS or CUDA.
  3. SVD constraint & compile. The adapter is spectrally bounded, merged with the base GGUF, and recompiled by llama.cpp.
  4. Federated sync. The orthogonal delta is hashed and pushed to the global hub.
  5. Hot-swap. The new GGUF is swapped into the server with zero downtime.

Core commands

rays --studio                # open the interactive TUI
rays --studio --start        # launch the daemon (FastAPI :8000, llama.cpp :8001)
rays --studio --force-sync   # manually trigger local fine-tune + push

Connecting the agent

  1. Run rays.
  2. Choose Select AI Provider → RAYS Studio.
  3. Enter the base URL:
    # Local
    http://localhost:8001/v1
    
    # Remote node
    http://<NODE_IP>:8001/v1

Storage layout

  • ~/.rays/models/ — base and hot-swapped GGUFs
  • ~/.rays/logs/success/ — training data
  • Older GGUFs are targeted for garbage collection during hot-swap to keep disk usage bounded.

Multi-client federation

Because Studio exposes a clean OpenAI-compatible API, topologies scale trivially:

  1. Deploy one server node with rays --studio --start.
  2. Point every client's base URL at that node's :8001/v1.
  3. Each client runs its own --force-sync locally, producing deltas that stream back to the server.

The central server never bottlenecks on training compute — the heavy PyTorch math stays on the edge.