Skip to content

Commit 6b232c3

Browse files
Deploying to gh-pages from @ dstackai/dstack@fb8282e 🚀
1 parent 80f8092 commit 6b232c3

25 files changed

Lines changed: 160 additions & 116 deletions

File tree

-793 Bytes
Loading

blog/changelog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5057,7 +5057,7 @@ <h1 id="changelog">Changelog<a class="headerlink" href="#changelog" title="Perma
50575057
<div class="md-post__content md-typeset">
50585058
<h2 id="presets-a-toolkit-for-agent-based-inference-optimization"><a class="toclink" href="../presets/">Presets: a toolkit for agent-based inference optimization</a></h2>
50595059
<p>Optimizing model inference is agent work now. Every inference provider does it inside its own process, on its own serving stack, with its own harness around the optimization agent. Despite the progress in open-source serving frameworks, what gets published is a benchmark, often without the workload, the concurrency, and the hardware behind it. The optimized deployment itself stays tied to the stack that produced it.</p>
5060-
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format that can be deployed to any cloud, Kubernetes cluster, or bare-metal fleet.</p>
5060+
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format.</p>
50615061
<p><img src="https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" width="650" /></p>
50625062

50635063

blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5057,7 +5057,7 @@ <h1 id="blog">Blog<a class="headerlink" href="#blog" title="Permanent link">&par
50575057
<div class="md-post__content md-typeset">
50585058
<h2 id="presets-a-toolkit-for-agent-based-inference-optimization"><a class="toclink" href="presets/">Presets: a toolkit for agent-based inference optimization</a></h2>
50595059
<p>Optimizing model inference is agent work now. Every inference provider does it inside its own process, on its own serving stack, with its own harness around the optimization agent. Despite the progress in open-source serving frameworks, what gets published is a benchmark, often without the workload, the concurrency, and the hardware behind it. The optimized deployment itself stays tied to the stack that produced it.</p>
5060-
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format that can be deployed to any cloud, Kubernetes cluster, or bare-metal fleet.</p>
5060+
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format.</p>
50615061
<p><img src="https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" width="650" /></p>
50625062

50635063

blog/posts/presets.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Presets: a toolkit for agent-based inference optimization"
33
date: 2026-08-20
4-
description: "A preview of presets: a toolkit that streamlines agent-based inference optimization, and a portable format that deploys the result to any cloud or datacenter."
4+
description: "A preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format."
55
slug: presets
66
image: https://dstack.ai/static-assets/static-assets/images/dstack-presets.png
77
categories:
@@ -12,15 +12,13 @@ categories:
1212

1313
Optimizing model inference is agent work now. Every inference provider does it inside its own process, on its own serving stack, with its own harness around the optimization agent. Despite the progress in open-source serving frameworks, what gets published is a benchmark, often without the workload, the concurrency, and the hardware behind it. The optimized deployment itself stays tied to the stack that produced it.
1414

15-
Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format that can be deployed to any cloud, Kubernetes cluster, or bare-metal fleet.
15+
Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format.
1616

1717
<img src="https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" width="650" />
1818

1919
<!-- more -->
2020

21-
Despite the progress in open-source serving frameworks, there is still no way to get optimization and deployment that delivers portable performance. That work happens inside each inference provider's own proprietary stack, with its own harness around the agent. This has to change.
22-
23-
Deploying Kimi K3 should be as simple as deploying a Docker image, on any silicon and in any datacenter. Taking a model someone has already optimized and running it on your own hardware should not mean rebuilding the stack or repeating the optimization, whichever silicon you have.
21+
Deploying Kimi K3 to any cloud, Kubernetes cluster, or bare-metal fleet should be as simple as deploying a Docker image. Taking a model someone has already optimized and running it on your own hardware should not mean rebuilding the stack or repeating the optimization, whichever silicon you have.
2422

2523
## Toolkit and portable format
2624

blog/presets/index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8">
77
<meta name="viewport" content="width=device-width,initial-scale=1">
88

9-
<meta name="description" content="A preview of presets: a toolkit that streamlines agent-based inference optimization, and a portable format that deploys the result to any cloud or datacenter.">
9+
<meta name="description" content="A preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format.">
1010

1111

1212
<meta name="author" content="dstack GmbH">
@@ -140,7 +140,7 @@
140140

141141
<meta property="og:type" content="website" />
142142
<meta property="og:title" content="Presets: a toolkit for agent-based inference optimization - dstack" />
143-
<meta property="og:description" content="A preview of presets: a toolkit that streamlines agent-based inference optimization, and a portable format that deploys the result to any cloud or datacenter." />
143+
<meta property="og:description" content="A preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format." />
144144
<meta property="og:image" content="
145145
https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" />
146146
<meta property="og:image:type" content="image/png" />
@@ -149,7 +149,7 @@
149149
<meta property="og:url" content="https://dstack.ai/blog/presets/" />
150150
<meta property="twitter:card" content="summary_large_image" />
151151
<meta property="twitter.title" content="Presets: a toolkit for agent-based inference optimization - dstack" />
152-
<meta property="twitter:description" content="A preview of presets: a toolkit that streamlines agent-based inference optimization, and a portable format that deploys the result to any cloud or datacenter." />
152+
<meta property="twitter:description" content="A preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format." />
153153
<meta property="twitter:image" content="
154154
https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" />
155155
</head>
@@ -4917,12 +4917,11 @@ <h2>Need help?</h2>
49174917

49184918
<h1 id="presets-a-toolkit-for-agent-based-inference-optimization">Presets: a toolkit for agent-based inference optimization<a class="headerlink" href="#presets-a-toolkit-for-agent-based-inference-optimization" title="Permanent link">&para;</a></h1>
49194919
<p>Optimizing model inference is agent work now. Every inference provider does it inside its own process, on its own serving stack, with its own harness around the optimization agent. Despite the progress in open-source serving frameworks, what gets published is a benchmark, often without the workload, the concurrency, and the hardware behind it. The optimized deployment itself stays tied to the stack that produced it.</p>
4920-
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format that can be deployed to any cloud, Kubernetes cluster, or bare-metal fleet.</p>
4920+
<p>Today we're introducing a preview of presets: an open-source toolkit that streamlines inference optimization with agents, and a portable preset format.</p>
49214921
<p><img src="https://dstack.ai/static-assets/static-assets/images/dstack-presets.png" width="650" /></p>
49224922
<!-- more -->
49234923

4924-
<p>Despite the progress in open-source serving frameworks, there is still no way to get optimization and deployment that delivers portable performance. That work happens inside each inference provider's own proprietary stack, with its own harness around the agent. This has to change.</p>
4925-
<p>Deploying Kimi K3 should be as simple as deploying a Docker image, on any silicon and in any datacenter. Taking a model someone has already optimized and running it on your own hardware should not mean rebuilding the stack or repeating the optimization, whichever silicon you have.</p>
4924+
<p>Deploying Kimi K3 to any cloud, Kubernetes cluster, or bare-metal fleet should be as simple as deploying a Docker image. Taking a model someone has already optimized and running it on your own hardware should not mean rebuilding the stack or repeating the optimization, whichever silicon you have.</p>
49264925
<h2 id="toolkit-and-portable-format">Toolkit and portable format<a class="headerlink" href="#toolkit-and-portable-format" title="Permanent link">&para;</a></h2>
49274926
<p>Think of Docker images. Docker gives you a toolkit for building an image, and a format that deploys to any datacenter or cloud reproducibly.</p>
49284927
<p><code>dstack</code> introduces a similar concept applied to building optimized inference and its deployment. Presets offer two things: a toolkit that streamlines the optimization itself using agents, and a portable format that deploys the final preset to any cloud, Kubernetes cluster, or bare-metal fleet.</p>

docs/concepts/dev-environments/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6009,7 +6009,8 @@ <h3 id="idle-duration">Idle duration<a class="headerlink" href="#idle-duration"
60096009
the shorter of the fleet's and run's <code>idle_duration</code> is used.
60106010
If the run reuses an existing fleet instance, only the fleet's
60116011
<a href="../../reference/dstack.yml/fleet/#idle_duration"><code>idle_duration</code></a> applies.</p>
6012-
<p>If an instance remains <code>idle</code>, it is automatically terminated after <code>idle_duration</code>.</p>
6012+
<p>If an instance remains <code>idle</code>, it is automatically terminated after <code>idle_duration</code>,
6013+
unless the fleet is already at <code>nodes.min</code>.</p>
60136014
<blockquote>
60146015
<p>Not applied for container-based backends (Kubernetes, Vast.ai, Runpod).</p>
60156016
</blockquote>

docs/concepts/fleets.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,22 @@ Backend fleets allow you to set `backends` to specify which backends are allowed
318318

319319
### Idle duration
320320

321-
By default, instances of a backend fleet stay `idle` for 3 days and can be reused within that time.
322-
If an instance is not reused within this period, it is automatically terminated.
321+
Instances of a backend fleet that aren't running any jobs are `idle` and can be reused by new runs.
322+
`dstack` terminates idle instances above [`nodes.min`](#nodes) after
323+
[`idle_duration`](../reference/dstack.yml/fleet.md#idle_duration), which defaults to 3 days.
323324

324-
To change the default idle duration, set
325-
[`idle_duration`](../reference/dstack.yml/fleet.md#idle_duration) in the fleet configuration (e.g., `0s`, `1m`, or `off` for
326-
unlimited).
325+
For `idle_duration` to have an effect, `nodes` must be a range. Set `min` to `0` and `target` to
326+
the number of instances to pre-provision:
327327

328328
<div editor-title="fleet.dstack.yml">
329329

330330
```yaml
331331
type: fleet
332332
name: my-fleet
333333
334-
nodes: 2
334+
nodes:
335+
min: 0
336+
target: 2
335337
336338
# Terminate instances idle for more than 1 hour
337339
idle_duration: 1h
@@ -342,6 +344,16 @@ resources:
342344

343345
</div>
344346

347+
`dstack apply` provisions `target` instances, and every instance that stays idle for
348+
`idle_duration` is terminated until the fleet is down to `min`. Set `idle_duration` to `0s` to
349+
terminate instances as soon as they become idle, or to `off` to never terminate them.
350+
351+
!!! info "Fixed number of nodes"
352+
Instances are never terminated on idle duration if the fleet is already at `nodes.min`, since
353+
`dstack` would immediately provision new ones to maintain `min`. A fleet with a fixed size,
354+
e.g. `nodes: 2`, has `min` equal to `2`, so it keeps its instances regardless of
355+
`idle_duration`.
356+
345357
### Blocks
346358

347359
By default, a job uses the entire instance—e.g., all 8 GPUs. To allow multiple jobs on the same instance, set the `blocks` property to divide the instance. Each job can then use one or more blocks, up to the full instance.

docs/concepts/fleets/index.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5599,17 +5599,19 @@ <h3 id="spot-policy">Spot policy<a class="headerlink" href="#spot-policy" title=
55995599
<h3 id="backends_1">Backends<a class="headerlink" href="#backends_1" title="Permanent link">&para;</a></h3>
56005600
<p>Backend fleets allow you to set <code>backends</code> to specify which backends are allowed to be used.</p>
56015601
<h3 id="idle-duration">Idle duration<a class="headerlink" href="#idle-duration" title="Permanent link">&para;</a></h3>
5602-
<p>By default, instances of a backend fleet stay <code>idle</code> for 3 days and can be reused within that time.
5603-
If an instance is not reused within this period, it is automatically terminated.</p>
5604-
<p>To change the default idle duration, set
5605-
<a href="../../reference/dstack.yml/fleet/#idle_duration"><code>idle_duration</code></a> in the fleet configuration (e.g., <code>0s</code>, <code>1m</code>, or <code>off</code> for
5606-
unlimited).</p>
5602+
<p>Instances of a backend fleet that aren't running any jobs are <code>idle</code> and can be reused by new runs.
5603+
<code>dstack</code> terminates idle instances above <a href="#nodes"><code>nodes.min</code></a> after
5604+
<a href="../../reference/dstack.yml/fleet/#idle_duration"><code>idle_duration</code></a>, which defaults to 3 days.</p>
5605+
<p>For <code>idle_duration</code> to have an effect, <code>nodes</code> must be a range. Set <code>min</code> to <code>0</code> and <code>target</code> to
5606+
the number of instances to pre-provision:</p>
56075607
<div editor-title="fleet.dstack.yml">
56085608

56095609
<div class="highlight"><pre><span></span><code><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fleet</span>
56105610
<span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-fleet</span>
56115611

5612-
<span class="nt">nodes</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span>
5612+
<span class="nt">nodes</span><span class="p">:</span>
5613+
<span class="w"> </span><span class="nt">min</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
5614+
<span class="w"> </span><span class="nt">target</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span>
56135615

56145616
<span class="c1"># Terminate instances idle for more than 1 hour</span>
56155617
<span class="nt">idle_duration</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1h</span>
@@ -5620,6 +5622,16 @@ <h3 id="idle-duration">Idle duration<a class="headerlink" href="#idle-duration"
56205622

56215623
</div>
56225624

5625+
<p><code>dstack apply</code> provisions <code>target</code> instances, and every instance that stays idle for
5626+
<code>idle_duration</code> is terminated until the fleet is down to <code>min</code>. Set <code>idle_duration</code> to <code>0s</code> to
5627+
terminate instances as soon as they become idle, or to <code>off</code> to never terminate them.</p>
5628+
<div class="admonition info">
5629+
<p class="admonition-title">Fixed number of nodes</p>
5630+
<p>Instances are never terminated on idle duration if the fleet is already at <code>nodes.min</code>, since
5631+
<code>dstack</code> would immediately provision new ones to maintain <code>min</code>. A fleet with a fixed size,
5632+
e.g. <code>nodes: 2</code>, has <code>min</code> equal to <code>2</code>, so it keeps its instances regardless of
5633+
<code>idle_duration</code>.</p>
5634+
</div>
56235635
<h3 id="blocks">Blocks<a class="headerlink" href="#blocks" title="Permanent link">&para;</a></h3>
56245636
<p>By default, a job uses the entire instance—e.g., all 8 GPUs. To allow multiple jobs on the same instance, set the <code>blocks</code> property to divide the instance. Each job can then use one or more blocks, up to the full instance.</p>
56255637
<div class="tabbed-set tabbed-alternate" data-tabs="5:2"><input checked="checked" id="backend-fleets_2" name="__tabbed_5" type="radio" /><input id="ssh-fleets_2" name="__tabbed_5" type="radio" /><div class="tabbed-labels"><label for="backend-fleets_2">Backend fleets</label><label for="ssh-fleets_2">SSH fleets</label></div>

docs/concepts/services/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6946,7 +6946,8 @@ <h3 id="idle-duration">Idle duration<a class="headerlink" href="#idle-duration"
69466946
the shorter of the fleet's and run's <code>idle_duration</code> is used.
69476947
If the run reuses an existing fleet instance, only the fleet's
69486948
<a href="../../reference/dstack.yml/fleet/#idle_duration"><code>idle_duration</code></a> applies.</p>
6949-
<p>If an instance remains <code>idle</code>, it is automatically terminated after <code>idle_duration</code>.</p>
6949+
<p>If an instance remains <code>idle</code>, it is automatically terminated after <code>idle_duration</code>,
6950+
unless the fleet is already at <code>nodes.min</code>.</p>
69506951
<blockquote>
69516952
<p>Not applied for container-based backends (Kubernetes, Vast.ai, Runpod).</p>
69526953
</blockquote>

docs/concepts/snippets/manage-fleets.ext

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ the shorter of the fleet's and run's `idle_duration` is used.
3636
If the run reuses an existing fleet instance, only the fleet's
3737
[`idle_duration`](../reference/dstack.yml/fleet.md#idle_duration) applies.
3838

39-
If an instance remains `idle`, it is automatically terminated after `idle_duration`.
39+
If an instance remains `idle`, it is automatically terminated after `idle_duration`,
40+
unless the fleet is already at `nodes.min`.
4041

4142
> Not applied for container-based backends (Kubernetes, Vast.ai, Runpod).

0 commit comments

Comments
 (0)