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
Copy file name to clipboardExpand all lines: docs/config_search.md
+83-14Lines changed: 83 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,6 @@
1
1
<!--
2
-
Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved.
3
-
4
-
Licensed under the Apache License, Version 2.0 (the "License");
5
-
you may not use this file except in compliance with the License.
6
-
You may obtain a copy of the License at
7
-
8
-
http://www.apache.org/licenses/LICENSE-2.0
9
-
10
-
Unless required by applicable law or agreed to in writing, software
11
-
distributed under the License is distributed on an "AS IS" BASIS,
12
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
-
See the License for the specific language governing permissions and
14
-
limitations under the License.
2
+
SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+
SPDX-License-Identifier: Apache-2.0
15
4
-->
16
5
17
6
# Table of Contents
@@ -240,7 +229,8 @@ manual sweep:
240
229
241
230
_This mode has the following limitations:_
242
231
243
-
- If model config parameters are specified, they can contain only one possible combination of parameters
232
+
- Top-level models can contain only one possible combination of model config parameters
233
+
- Composing models (ensemble/BLS sub-models) can specify parameter ranges if they follow specific patterns (see [Ensemble Composing Model Parameter Ranges](#ensemble-composing-model-parameter-ranges))
244
234
245
235
This mode uses a hill climbing algorithm to search the configuration space, looking for
246
236
the maximal objective value within the specified constraints. In the majority of cases
@@ -262,6 +252,77 @@ profile_models:
262
252
263
253
---
264
254
255
+
### **Ensemble Composing Model Parameter Ranges**
256
+
257
+
When profiling ensemble or BLS models in Quick search mode, composing models (sub-models) can specify parameter ranges for `instance_group` count. This enables optimization of composing models with different resource requirements, such as:
258
+
259
+
- CPU-bound models (tokenizers, preprocessors) that may benefit from higher instance counts
260
+
- GPU-bound models (inference models, embeddings) with limited GPU memory
261
+
262
+
**Supported Instance Count Patterns:**
263
+
264
+
Model Analyzer supports two types of instance count sequences that map to Quick search's coordinate system:
265
+
266
+
1. **Powers of 2**: `[1, 2, 4, 8, 16, 32]`or subsets like `[2, 4, 8]`
- The tokenizer (CPU model) searches instance counts from 1 to 32
320
+
- The inference model (GPU model) searches instance counts from 1 to 8
321
+
- Quick search explores both dimensions in parallel to find the optimal combination
322
+
- The ensemble model itself has fixed parameters (single combination)
323
+
324
+
---
325
+
265
326
### **Limiting Batch Size, Instance Group, and Client Concurrency**
266
327
267
328
Using the `--run-config-search-<min/max>...` config options you have the ability to clamp the algorithm's upper or lower bounds for the model's batch size and instance group count, as well as the client's request concurrency.
@@ -398,6 +459,10 @@ _This mode has the following limitations:_
398
459
399
460
Ensemble models can be optimized using the Quick Search mode's hill climbing algorithm to search the composing models' configuration spaces in parallel, looking for the maximal objective value within the specified constraints. Model Analyzer has observed positive outcomes towards finding the maximum objective value; with runtimes under one hour (compared to the days it would take a brute force run to complete) for ensembles that contain up to four composing models.
400
461
462
+
**Composing Model Parameter Ranges:**
463
+
464
+
Composing models within ensembles can specify instance count ranges to optimize models with different resource requirements (e.g., CPU tokenizers vs GPU inference models). See [Ensemble Composing Model Parameter Ranges](#ensemble-composing-model-parameter-ranges) for details on supported patterns and configuration examples.
465
+
401
466
After Model Analyzer has found the best config(s), it will then sweep the top-N configurations found (specified by `--num-configs-per-model`) over the concurrency range before generation of the summary reports.
402
467
403
468
---
@@ -412,6 +477,10 @@ _This mode has the following limitations:_
412
477
413
478
BLS models can be optimized using the Quick Search mode's hill climbing algorithm to search the BLS composing models' configuration spaces, as well as the BLS model's instance count, in parallel, looking for the maximal objective value within the specified constraints. Model Analyzer has observed positive outcomes towards finding the maximum objective value; with runtimes under one hour (compared to the days it would take a brute force run to complete) for BLS models that contain up to four composing models.
414
479
480
+
**Composing Model Parameter Ranges:**
481
+
482
+
BLS composing models can specify instance count ranges to optimize models with different resource requirements. Models are identified using the `bls_composing_models` configuration parameter. See [Ensemble Composing Model Parameter Ranges](#ensemble-composing-model-parameter-ranges) for details on supported patterns and configuration examples.
483
+
415
484
After Model Analyzer has found the best config(s), it will then sweep the top-N configurations found (specified by `--num-configs-per-model`) over the concurrency range before generation of the summary reports.
0 commit comments