You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [Presets] Allow PD disaggregation (1s iteration)
* Update skills and system prompt
* [Presets] Use the groups syntax for grouped services in exported and stored YAML
* [Presets] Document PD disaggregation across skills and the preset system prompt
Cover node groups (tasks) and replica groups (services) in the dstack and
dstack-prototyping skills and the preset system prompt: replica/job targeting
for logs/attach/ssh, SSH alias naming, cluster placement for PD, per-group
sleep-infinity for prototyping, and the groups-based trial.json format.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* [Presets] Key trial.json format on node groups and fix replica/job default wording
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Drop groups serializer and keep groups
---------
Co-authored-by: Bihan Rana
Co-authored-by: Andrey Cheptsov <andrey.cheptsov@github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: skills/dstack-prototyping/SKILL.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ Pick the offer whose hardware best fits the goal at hand. Only when several offe
27
27
Fetch `https://dstack.ai/docs/concepts/backends.md` and classify backends
28
28
from the fetched document, not from memory.
29
29
30
+
If the intention is to use PD disaggregation, the fleet must use `placement: cluster`. Since PD disaggregation implies running a router, unlike workers that must run on GPUs, the router normally should run on a CPU instance. Use `dstack fleet` to see existing fleets and `dstack fleet get <fleet name> --json` to inspect a specific fleet.
31
+
30
32
## Check Serving Sources
31
33
32
34
Check serving-framework sources early enough to choose the image, command,
@@ -98,3 +100,20 @@ If service verification fails because the image, install, model download,
98
100
command, resources, cache, or model behavior needs to change, go back to a task.
99
101
If the tested serving setup is still right and only the dstack service
100
102
configuration is wrong, fix the configuration and submit the service again.
103
+
104
+
## PD disaggregation
105
+
106
+
If the intention is to use PD disaggregation:
107
+
108
+
- Use node groups for the task and replica groups for the service: tasks' node
109
+
groups are the equivalent of services' replica groups.
110
+
- In both cases, you run a router and prefill/decode workers separately, and
111
+
you need to use a fleet with an interconnect (`placement: cluster`).
112
+
- With tasks, still use `sleep infinity` even when using `groups` (set it in
113
+
each group's `commands`; top-level `commands` is not allowed with `groups`),
114
+
and run the actual commands on each node interactively over SSH.
115
+
- When testing inference, call the router endpoint, not the workers directly
116
+
(unless you want to test if they are alive).
117
+
- Look for "Node groups" and "PD disaggregation" in
118
+
`https://dstack.ai/docs/concepts/tasks.md`and "Replica groups" and
Copy file name to clipboardExpand all lines: skills/dstack/SKILL.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,6 +148,14 @@ If background attach fails in the sandbox (permissions writing `~/.dstack` or `~
148
148
149
149
**"Connect to" or "open" a dev environment:** If a dev environment is already running, use `dstack attach <run name> --logs` (agent runs it in the background by default) to surface the IDE URL (`cursor://`, `vscode://`, etc.) and SSH alias. If sandboxed attach fails, request escalation or ask the user to run attach locally and share the link.
150
150
151
+
### Distributed tasks and multi-replica services
152
+
153
+
Unless you use **Distributed tasks** (see `### 2. Tasks`) or **Multi-replica services** (see `### 3. Services`), both tasks and services run on a single node. That's why `dstack logs <run name>`, `dstack attach <run name>`, and `ssh <run name>` default to the first replica/job.
154
+
155
+
- In a distributed task, each node runs its own job, numbered from 0 in order across node groups. Target a node via `dstack logs <run name> --job 1` or `dstack attach <run name> --job 1`.
156
+
- In a multi-replica service, replicas are numbered from 0 in order across replica groups. Target a replica via `dstack logs <run name> --replica 1` or `dstack attach <run name> --replica 1`.
157
+
- Attaching with a non-zero `--job` or `--replica` creates the SSH alias `ssh <run name>-<job num>-<replica num>`.
158
+
151
159
## Configuration types
152
160
153
161
`dstack` supports run configurations (dev environments, tasks, and services) and infrastructure configurations (fleets, volumes, and gateways). Configuration files can be named `<name>.dstack.yml` or simply `.dstack.yml`.
@@ -222,7 +230,7 @@ resources:
222
230
223
231
**Port forwarding:** When you specify `ports`, `dstack apply` forwards them to `localhost` while attached. Use `dstack attach <run name>` to reconnect and restore port forwarding. The run name becomes an SSH alias (e.g., `ssh <run name>`) for direct access.
224
232
225
-
**Distributed training:** Multi-node tasks are supported (e.g., via `nodes`) and require fleets that support inter-node communication (see `placement: cluster` in fleets).
233
+
**Distributed tasks:** Set `nodes` to run a task across multiple nodes, or use `groups` to define node groups, each with its own `nodes` count, `resources`, `commands`, and `ports` (`groups` and top-level `nodes` are mutually exclusive). Requires a fleet that supports inter-node communication (see `placement: cluster` in fleets).
**Multi-replica services:** Set `replicas` to run multiple replicas, or use `groups` to define replica groups, each with its own `replicas` count, `resources`, and `commands` (`groups` and top-level `replicas` are mutually exclusive). If replicas require an interconnect (e.g., PD disaggregation), the service must run on a fleet with `placement: cluster`.
0 commit comments