Configuration#
Every runtime option lives in a single YAML file, loaded into
DomynLLMSwarmConfig. The tables below are
generated from the Pydantic models, so they always match the installed version.
A field marked required must be present. A field marked computed has a default derived at load time from other fields — see the field’s description for the formula.
Values are resolved highest priority first:
the CLI arguments and this YAML config
defaults.yaml, written bydomyn-swarm init defaultsthe built-in defaults shown below
Any field you omit inherits the default, so configs can stay minimal.
Models#
DomynLLMSwarmConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Hugging Face model ID or local path. Passed verbatim to |
|
|
required |
Name of the swarm. Stripped of surrounding whitespace, lower-cased and limited to 38 characters so it fits backend resource-name limits. The swarm’s unique id is this name plus a short suffix. |
|
`str |
None` |
|
|
|
|
How many independent vLLM clusters to launch. Useful for A/B tests. |
|
|
|
How many GPUs each replica uses. Also sets vLLM’s |
|
|
|
Number of GPUs per node (vLLM) |
|
`int |
None` |
|
|
`int |
None` |
|
|
`int |
None` |
|
|
`str |
None` |
|
|
|
|
Seconds the load-balancer script waits for the endpoint to come up before giving up. |
|
`str |
EnvPath` |
computed |
|
|
|
Extra CLI flags passed verbatim to |
|
|
|
Port on which each replica’s OpenAI-compatible API listens. |
|
|
computed |
Home directory where logs and state are stored |
|
`Annotated[LeptonConfig |
SlurmConfig, annotation=NoneType required=True discriminator=’type’] |
None` |
|
`dict[str, str] |
None` |
|
|
|
computed |
Watchdog settings governing how the spawned vLLM replicas are monitored and restarted. |
BackendsConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
`list[Annotated[LeptonConfig |
SlurmConfig, annotation=NoneType required=True discriminator=’type’]]` |
required |
SlurmConfig#
Configuration for SLURM-based deployments.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Backend discriminator; always |
|
|
computed |
Slurm partition to submit to. |
|
|
computed |
Slurm account or charge code. |
|
|
computed |
Slurm QoS for the cluster and load-balancer jobs. The load balancer can override it with |
|
`bool |
None` |
|
|
|
|
Port for Ray’s GCS / head node inside each replica. |
|
|
|
Port for the optional Ray dashboard. |
|
|
computed |
Environment modules to |
|
|
computed |
Additional lines inserted near the top of the generated cluster sbatch script, before the module loads. Use for extra sbatch directives or shell setup. |
|
|
computed |
Path to the Jinja2 template for the cluster sbatch script. Auto-filled and normally left alone: a Ray deployment renders from |
|
|
computed |
Path to the Jinja2 template for the Nginx config. Auto-filled; there is normally no need to set it. |
|
|
|
Overall Slurm wall-clock limit for the allocation. |
|
`str |
None` |
|
|
`str |
None` |
|
|
`str |
None` |
|
|
|
computed |
Configuration for the Nginx load-balancer job. |
|
`EnvPath |
None` |
|
|
`dict[str, str] |
None` |
|
|
|
computed |
Extra Singularity bind mounts for the vLLM containers. Each entry is either ‘/path’ (bound at the same path inside the container) or ‘/host/path:/container/path’ (with an optional ‘:ro’/’:rw’ suffix). Appended verbatim to the container’s bind list. |
SlurmEndpointConfig#
Configuration for the Nginx load-balancer job fronting the replicas.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
vCPUs for the driver process that launches and monitors the swarm. |
|
|
|
Physical memory for the driver job. |
|
|
|
SMT threads to request per physical core. |
|
|
|
Slurm time limit for the driver job. |
|
|
|
Enable Nginx response and request buffering in the generated load balancer config. Turn it off for streaming responses that should reach the client as they are produced. |
|
`str |
int` |
|
|
|
|
External port exposed by the Nginx load balancer. |
|
`str |
EnvPath` |
computed |
|
`str |
None` |
|
|
|
|
Seconds between |
|
|
|
Refuse to build an |
|
|
computed |
Prometheus and GPU-exporter sidecars running alongside the load balancer. Off by default, and Slurm-only. |
MonitoringConfig#
Optional Prometheus-based monitoring sidecars for the load-balancer node. Disabled by default; when disabled the load balancer behaves exactly as it did before monitoring existed. Slurm only.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Run Prometheus and an Nginx exporter alongside the load balancer. Master switch: with it off, every other field here is ignored. |
|
`”container” |
“binary”` |
|
|
`str |
None` |
computed |
|
`str |
None` |
computed |
|
|
|
Prometheus binary name or path, for |
|
|
|
nginx-prometheus-exporter binary name or path, for |
|
|
|
Port Prometheus listens on, on the load-balancer node. Reached through the load balancer rather than directly, so this is not the port you connect to. |
|
|
|
Port the Nginx exporter serves its metrics on for Prometheus to scrape. |
|
|
|
Path under the swarm’s endpoint where Prometheus is served. A leading slash is added if missing. |
|
|
|
How often Prometheus scrapes every target. |
|
|
|
How long Prometheus keeps samples. The database is node-local and dies with the load-balancer job, so this only caps a single run. |
|
|
computed |
Per-node GPU metrics exporter. Off by default. |
|
|
computed |
Scraping of Ray’s own metrics. Auto-enabled for Ray deployments. |
GpuExporterConfig#
Optional per-node GPU metrics exporter for replica nodes. Disabled by default. kind selects both the exporter implementation and the metric vocabulary the bundled dashboard expects, so changing it changes which dashboard domyn-swarm monitor --gpu loads.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Run a GPU exporter on every replica node. Requires |
|
`”nvidia_smi” |
“dcgm”` |
|
|
`str |
None` |
|
|
`str |
None` |
|
|
|
|
Port each node’s exporter listens on for Prometheus to scrape. |
RayMetricsConfig#
Optional scraping of Ray’s per-node Prometheus metrics (ray_*). Only meaningful for Ray multi-node replicas. Left unset it resolves itself: on when monitoring is on and the deployment requires Ray, off otherwise.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
`bool |
None` |
|
|
|
|
Ray’s |
LeptonConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Backend discriminator; always |
|
|
computed |
Lepton workspace ID |
|
|
computed |
Serving endpoint configuration: image, resource shape, mounts, environment and token secret. |
|
|
computed |
Batch job configuration: image, resource shape, mounts and environment. |
|
|
computed |
Global environment variables applied to both the endpoint and jobs where relevant. |
LeptonEndpointConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Container image running the serving endpoint, i.e. a vLLM OpenAI-compatible server. |
|
`list[str] |
None` |
|
|
|
|
Lepton resource shape for endpoint replicas, describing accelerator type, count and memory, e.g. |
|
|
computed |
Specific nodes within a node group on which the endpoint may run. Empty means any node in the allowed groups. |
|
|
computed |
Filesystem mounts injected into the endpoint container. Normalised to Lepton |
|
|
computed |
Environment variables set on the endpoint container. |
|
`str |
None` |
|
|
`list[str] |
None` |
|
LeptonJobConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
`list[str] |
None` |
|
|
|
|
Container image used by domyn-swarm driver jobs on Lepton. |
|
|
|
Lepton resource shape for batch job execution. |
|
|
computed |
Specific nodes on which batch jobs may run. Empty means any node in the allowed groups. |
|
|
computed |
Filesystem mounts injected into the job container. Normalised to Lepton |
|
|
computed |
Environment variables set on the job container. |
|
`list[str] |
None` |
|
WatchdogConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Master switch for the per-replica watchdog process. |
|
|
|
Seconds between watchdog HTTP and Ray health probes. |
|
|
|
HTTP path probed on the vLLM REST server to determine readiness and health. A leading |
|
|
|
Seconds allowed for each HTTP health probe request. |
|
|
|
Seconds the server is given to become ready before it is considered unhealthy. |
|
`”always” |
“on-failure” |
“never”` |
|
|
|
If the replica stays unhealthy for this many seconds, the watchdog forces a restart, or exits, depending on the restart policy. |
|
|
|
Maximum restart attempts before giving up and leaving the replica in the failed state. |
|
|
|
Seconds to wait before the first restart attempt. |
|
|
|
Upper bound in seconds for the exponential backoff between restart attempts. |
|
|
|
Seconds to wait after SIGTERM before the watchdog sends SIGKILL to the child process. |
|
`”debug” |
“info” |
“warning” |
|
|
computed |
Ray-aware health checking, layered on top of the HTTP probe. Disabled unless |
WatchdogRayConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Enable Ray-aware health checks (cluster liveness and capacity) in addition to the HTTP checks. |
|
`int |
None` |
|
|
|
|
Seconds allowed for each Ray health probe command, such as |
|
|
|
Ray must report healthy for at least this many seconds before the watchdog treats it as fully ready. |
|
|
|
Seconds between Ray health probes when Ray checks are enabled. |
SwarmPoolConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
The swarms making up the pool, one entry per swarm. |
SwarmPoolElement#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Label identifying this swarm within the pool. |
|
|
required |
Path to a |