Skip to content

DocsOperate and improve

5 min read · updated

Set up for production

The serving setup to keep for each certified task, the settings that make replicas agree, and what to certify again after a change.

Pin the settings below, and your replicas answer the same way and each certificate stays valid. They are a short list, and one change means certifying again.

Keep one serving setup for each certified task. After an upgrade or a change to the model, engine, hardware, precision, cache type, prompt ceiling, layout or serving flags, certify the task again.

NeedSet up and check
The same prompt ceiling across cardsSet --max-model-len explicitly and check /health
Repeated 12B reads independent of batch/cacheConsider --batch-invariant on, off by default; measure its added cost and certify again
Consistent 12B cold starts on replicasUse the certificate guidance for --deterministic-compile; leave it off on the 31B
Task persistence on one server--tasks-dir on a persistent volume, with --require-tasks
Shared tasks across replicasOne --task-store, the same stack, synchronized clocks and per-replica monitoring
Private accessAn authenticated proxy with rate and request-size limits; Operate

A certificate covers one task on one serving setup: the decisio version, the model and its revision, the engine, the card, the quantisation, the cache type, the context length, the prompt layout and the serving flags. When any of it changes, every answer of the task is certified: false with the reason serving_stack_changed. Certify again with POST /v1/tasks/{id}/certify, on new labelled examples.

  1. After upgrading decisio, certify your tasks again.
  2. Expect a few answers near the threshold to change sides between two fresh starts of the same server: judge the certificate by its rate over many answers, not by one.
  3. On the 12B with several replicas or fresh nodes, make cold starts agree with --deterministic-compile on, then certify again: the setting is part of what a certificate covers. Leave it off on the 31B, whose cold starts already agreed in the same check and whose answers it changes.
  4. Expect a repeated request to differ slightly from its first read. A request about a text the server has read before is computed on the blocks the prefix cache kept, which can move an answer near the threshold across it. On the 12B, --batch-invariant on, off by default, removes this: a request read from the cache gives the same bits as one read without it.

Each model’s longest text is on Requirements and limits; /health reports the length a server chose, as max_model_len.

  1. Give --max-model-len the same value on every card, for the same answers everywhere; --max-model-len 32768 serves only what was measured.
  2. Mind --gpu-memory-utilization. It changes the length a card gives a lot: on an 80 GB H100, the 31B served 98,304 tokens at 0.90 and 49,152 at 0.85, and did not start at 0.70.

A prompt longer than the length gets 422, and the server stays up.

  • One server: start it with --tasks-dir on a volume that outlives the container, and --require-tasks N, as Teach a task shows. One directory belongs to one server.
  • A volume that fails to mount: a server that finds fewer than N usable tasks refuses to start, so a volume that failed to mount does not turn into untaught answers.
  • A save that fails fails the request with 500, and the task is not registered.
  • A task registered under another id for the same question replaces the first on disk too, so a restart serves the task registered last.
  • Replicas behind a load balancer: start every one with --task-store on object storage, such as s3://bucket/prefix. A task taught on one replica reaches the others within --task-store-poll-seconds, 5 by default, as the same fitted record, so every replica serves the same numbers.
  • Two teachers at once: a second registration of the same task answers 409 instead of overwriting it; read the task again and send it again.
  • Keep fitting on one replica: start the others with --task-store-readonly and route the task-writing routes to that one.
  • A task with a fast table: every replica needs the decisio[table] extra and CPU headroom, and decides for itself whether to use it; Add a decision fast path has what each state means.
  • A fast table that learns from traffic: on the shared store the replicas learn one table together. One replica trains under a lease, every replica times each new version itself, and a restart loses nothing (Learn across replicas).
  • If the store goes away: replicas keep serving what they have, and teaching answers 503 until it is back; /health says so under systemone.task_store.
  • Thinking requires the vLLM engine in the server process; a thinking request can hold up other requests.
  • Batched concurrency requires vLLM or the development model in separate mode; MLX and packed mode reject it.
  • A certificate made under another thinking or concurrency setting is suspended until you certify again.
  • Tasks apply under their registered layout; another layout can produce layout_mismatch.
  • Read-twice settings, flavors and a default adapter are also part of the serving setup.
  • FP8 servers emulate bf16 rounding by default; changing that setting changes the setup too.

A shared-store write takes time to reach the other replicas; wait for the poll or read back from the writer. The store must support conditional writes; check it before routing traffic, and collect task metrics from every replica.

On a Mac, run one model server at a time. Choose its memory budget before starting another process that needs the same memory.