Documentation

Language models

Operate

  • Operate the platform
Operate
View .mdOpenAPI

Operate the platform

Status. Written from this build's code and tests on 2026-11-16. The in-cluster flush command below follows from the service's origin rule and has not been run against a live deployment for this page.

This page is for the operator of a deployment, not for a customer. Operating is three steps, always in this order: observe what is running, preview what the queue would stand up and what it would cost, then act by flushing the queue under a budget. The first two change nothing and can be repeated freely. Only the third can lead to GPUs being rented.

bash
export WEIGHTS_PUBLIC_URL=https://weights.fyi/run
export WEIGHTS_OPERATOR_TOKEN_FILE=~/.weights/operator.token   # a file holding an operator API token

weights status                       # 1. observe
weights plan --budget-usd 100        # 2. preview
weights flush --budget-usd 100 --operation-key my-run   # 3. act

Every command has --help, and every operator call is described, with who may call it and from where, at https://weights.fyi/run/v1/operator/openapi.json.

bash
WEIGHTS_OPERATOR_TOKEN=$(cat "$WEIGHTS_OPERATOR_TOKEN_FILE")
curl -sS https://weights.fyi/run/v1/operator/openapi.json \
  -H "Authorization: Bearer $WEIGHTS_OPERATOR_TOKEN"

The words

WordMeaning
ComputePlanA customer's queued work: stages with dependencies, a time window and a budget. It waits in the queue at no cost until a model that serves it is running.
CohortOne model, with every plan that asks for it.
WaveThe cohorts one node serves at the same time. A node moves from one wave to the next by swapping models, without a new boot.
Pass 1, Pass 2Pass 1 is qualification and benchmark work. Pass 2 is everything else.
FlushRe-evaluate the queue and record capacity demand. A flush rents nothing itself.
FleetThe controller that reads the demand, rents GPU nodes within its budget and stops them when the work is done.
Flush budgetThe operator's ceiling on what the fleet commits.
Plan capThe active plans' own budgets, summed: what customers' plans may spend. A different limit.
GHow many GPUs the fleet holds. G = 0 means nothing is rented.

1. Observe: weights status

weights status prints Snapshot v1, the one read-only document of the live estate. The same document is the page /operator/now and the JSON at https://weights.fyi/run/v1/operator/snapshot. --json prints it whole; --watch repeats it every period.

LineWhat it tells you
BOTTLENECKThe one thing holding work back now, with its evidence.
SPENDBurn of the nodes still running, what the active plans have settled and reserved, the plan cap, and the runway on what is left of it.
FLUSH BUDGETThe ceiling in force with its generation, lifted, or none set.
GPUSOne row per engine: state or boot step, load, KV cache, running and waiting requests.
WORK, QUEUEActive plans, tasks, useful output, the ready queue and the share of calls answered 429, 503 and 402.

A value marked * is stale, n/s is not supported by its source, and - was not measured. Nothing unmeasured is ever shown as zero.

2. Preview: two dry runs that answer different questions

The customer's preflightThe operator's plan
CallPOST /v1/compute/plans/dry-runweights plan --budget-usd CAP
ScopeOne ComputePlan, before it is submittedThe whole queue of submitted plans
AnswersWould this plan be admitted: its rules, the tenancy grant, each model's pinned release, each chat request against the model's context windowWhat the queue would stand up: the hardware offering chosen, the waves, the schedule, its duration and its cost against the cap
TokensubmitAn operator's, read
WritesNothingNothing. The cap is not saved

Read the plan's last block first. Work not scheduled by this plan lists what the plan leaves out and why, and it never cancels anything.

3. Act: weights flush and its budget

weights flush --budget-usd CAP re-evaluates the queue, records capacity demand and saves CAP as the flush budget. From then on the fleet commits no more than that, whatever later flushes without a budget do, until a flush states another amount or lifts it with --clear-budget. The budget is fleet-wide, even when the flush selected one account or a few plans.

Receipt fieldMeaning
budget_enforced: trueThis flush saved the budget and it is the one in force. false on a dry run, which saves nothing.
budget_generationThe decision's number. Every budget or lift is the next generation; the highest is in force.
active_flush_budgetThe decision in force now, on every flush answer and preview. Absent while no budget was ever set.
409 compute_plan_conflictThe --operation-key was already used with another budget decision. Nothing was written.

The floor. The fleet rents a node only when what is left of the budget pays for one cold boot (create, load the weights, start the engines) plus a first stretch of useful work and the stop. Below that it rents nothing and says how many minutes were funded and how many are required. A budget that is too small buys no partial run.

Where each command works.

CommandCallTokenFrom
weights statusGET /v1/operator/snapshotread, or the read-only snapshot tokenAnywhere
weights planGET /v1/operator/compute/planreadAnywhere
weights flush --dry-runGET /v1/operator/compute/flushreadAnywhere
weights flushPOST /v1/operator/compute/flushmanageThe operator mesh, or inside the cluster. 404 anywhere else

The flush is a write, so the public address answers it 404 whatever the token. Run it on a mesh host, or inside the cluster:

bash
kubectl -n <namespace> exec -i deploy/weights-api -- \
  env WEIGHTS_OPERATOR_TOKEN_FILE=/dev/stdin \
  python -m weights flush --url http://127.0.0.1:8888/run \
  --budget-usd 100 --operation-key my-run < "$WEIGHTS_OPERATOR_TOKEN_FILE"

The token is read from standard input, so it is never an argument. weights flush-queue is the same flush run directly on the database, with no budget and no dry run: prefer weights flush.

4. Queue everything, scope the active fleet

Submitting work and serving it are separate decisions. Every cohort can sit in the queue at G = 0; a run then serves some of them.

WhatWhere it is setWhat it decides
The queueEvery submitted ComputePlanWhat work exists. Scoping a run never edits or removes a plan.
The plan's active cohortsACTIVE_COHORTS in weights.capacity.terraform_planWhich models weights plan schedules. Work for any other model is listed as outside this run's active cohorts (remains queued).
The fleet's published poolscanonical_platform_pools in the fleet controller's configWhich models a rented node may serve. With restrict_demands_to_published_pools the fleet also ignores demand for any other model.

Work outside the scope is queued, not cancelled: it runs when a later fleet serves its model. Cancelled is a final state that only an explicit cancel request sets. A whole-queue flush re-evaluates every plan, whichever model it names; --plan-prefix or --plan-ids flushes a selection.

5. Two passes at once, and healthy 429

Pass 1 is budgeted first: its cost on every wave is taken out of the cap before any Pass 2 work is funded. It does not run first. On each wave both passes run side by side, and the node then swaps once to the next wave.

TierFair-share weightUsed by
priority4Pass 1
interactive3Interactive sessions
standard2Pass 2
flex, batch, scavenger, piggyback1Standing work

Pass 2 takes the slots Pass 1 leaves. When a GPU is full, one model turn is answered 429 with Retry-After (campaign_concurrency_limited); the client retries that turn and the campaign goes on. The scheduler aims to hold this pushback between 5% and 15% of turns, so a steady share in that band means the GPU is full and well used. 502, 503 and other 5xx are faults and belong to no target. See Rate limits.

6. From an AWOW campaign to a lease

AWOWWeightsIn the snapshot
A campaign submitted for one cohortOne ComputePlan, which carries the campaign's name, run id and workspace in its metadatajoins.rows[].awow and .weights.plan_id
The campaign's stepsThe plan's stages, each waiting for the stages it needsjoins.rows[].weights.stages[]
One agent's model sessionA seat: a time-limited reservation of one model session for a stagereserved_seats
A stage lease: the stage is placed on one GPU node (leased_to_node)gpu.nodes[].reserved.leased_stages
The agent's turnsCalls decoding on an engine nowdecoding_now
Worker and sandbox podsMatched by plan id, run id, campaign or job idjoins.rows[].grid

Reserved seats and decoding_now are kept apart on purpose: a seat is held while an agent thinks or runs a tool, and only a turn in flight is decoding.