|
| 1 | +# AutoDeploy Model Registry |
| 2 | + |
| 3 | +The AutoDeploy model registry provides a comprehensive, maintainable list of supported models for testing and coverage tracking. |
| 4 | + |
| 5 | +## Format |
| 6 | + |
| 7 | +**Version: 2.0** (Flat format with composable configurations) |
| 8 | + |
| 9 | +### Structure |
| 10 | + |
| 11 | +```yaml |
| 12 | +version: '2.0' |
| 13 | +description: AutoDeploy Model Registry - Flat format with composable configs |
| 14 | +models: |
| 15 | +- name: meta-llama/Llama-3.1-8B-Instruct |
| 16 | + yaml_extra: [dashboard_default.yaml, world_size_2.yaml] |
| 17 | + |
| 18 | +- name: meta-llama/Llama-3.3-70B-Instruct |
| 19 | + yaml_extra: [dashboard_default.yaml, world_size_4.yaml, llama-3.3-70b.yaml] |
| 20 | + |
| 21 | +- name: deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B |
| 22 | + yaml_extra: [dashboard_default.yaml, world_size_2.yaml, demollm_triton.yaml] |
| 23 | +``` |
| 24 | +
|
| 25 | +### Key Concepts |
| 26 | +
|
| 27 | +- **Flat list**: Models are in a single flat list (not grouped) |
| 28 | +- **Composable configs**: Each model references YAML config files via `yaml_extra` |
| 29 | +- **Deep merging**: Config files are merged in order (later files override earlier ones) |
| 30 | +- **No inline args**: All configuration is in YAML files for reusability |
| 31 | + |
| 32 | +## Configuration Files |
| 33 | + |
| 34 | +Config files are stored in `configs/` subdirectory and define runtime parameters: |
| 35 | + |
| 36 | +### Core Configs |
| 37 | + |
| 38 | +| File | Purpose | Example Use | |
| 39 | +|------|---------|-------------| |
| 40 | +| `dashboard_default.yaml` | Baseline settings for all models | Always first in yaml_extra | |
| 41 | +| `world_size_N.yaml` | GPU count (1, 2, 4, 8) | Defines tensor_parallel_size | |
| 42 | + |
| 43 | +### Runtime Configs |
| 44 | + |
| 45 | +| File | Purpose | |
| 46 | +|------|---------| |
| 47 | +| `multimodal.yaml` | Vision + text models | |
| 48 | +| `demollm_triton.yaml` | DemoLLM runtime with Triton backend | |
| 49 | +| `simple_shard_only.yaml` | Large models requiring simple sharding |
| 50 | + |
| 51 | +### Model-Specific Configs |
| 52 | + |
| 53 | +| File | Purpose | |
| 54 | +|------|---------| |
| 55 | +| `llama-3.3-70b.yaml` | Optimized settings for Llama 3.3 70B | |
| 56 | +| `nano_v3.yaml` | Settings for Nemotron Nano V3 | |
| 57 | +| `llama-4-scout.yaml` | Settings for Llama 4 Scout | |
| 58 | +| `openelm.yaml` | Apple OpenELM (custom tokenizer) | |
| 59 | +| `gemma3_1b.yaml` | Gemma 3 1B (sequence length) | |
| 60 | +| `deepseek_v3_lite.yaml` | DeepSeek V3/R1 (reduced layers) | |
| 61 | +| `llama4_maverick_lite.yaml` | Llama 4 Maverick (reduced layers) | |
| 62 | + |
| 63 | +## Adding a New Model |
| 64 | + |
| 65 | +### Simple Model (Standard Config) |
| 66 | + |
| 67 | +```yaml |
| 68 | +- name: organization/my-new-model-7b |
| 69 | + yaml_extra: [dashboard_default.yaml, world_size_2.yaml] |
| 70 | +``` |
| 71 | + |
| 72 | +### Model with Special Requirements |
| 73 | + |
| 74 | +```yaml |
| 75 | +- name: organization/my-multimodal-model |
| 76 | + yaml_extra: [dashboard_default.yaml, world_size_4.yaml, multimodal.yaml] |
| 77 | +``` |
| 78 | + |
| 79 | +### Model with Custom Config |
| 80 | + |
| 81 | +1. Create `configs/my_model.yaml`: |
| 82 | + |
| 83 | +```yaml |
| 84 | +# Custom settings for my model |
| 85 | +max_batch_size: 2048 |
| 86 | +kv_cache_free_gpu_memory_fraction: 0.95 |
| 87 | +cuda_graph_config: |
| 88 | + enable_padding: true |
| 89 | +``` |
| 90 | + |
| 91 | +2. Reference it in `models.yaml`: |
| 92 | + |
| 93 | +```yaml |
| 94 | +- name: organization/my-custom-model |
| 95 | + yaml_extra: [dashboard_default.yaml, world_size_8.yaml, my_model.yaml] |
| 96 | +``` |
| 97 | + |
| 98 | +## Config Merging |
| 99 | + |
| 100 | +Configs are merged in order. Example: |
| 101 | + |
| 102 | +```yaml |
| 103 | +yaml_extra: |
| 104 | + - dashboard_default.yaml # baseline: runtime=trtllm, benchmark_enabled=true |
| 105 | + - world_size_2.yaml # adds: tensor_parallel_size=2 |
| 106 | + - openelm.yaml # overrides: tokenizer=llama-2, benchmark_enabled=false |
| 107 | +``` |
| 108 | + |
| 109 | +**Result**: `runtime=trtllm, tensor_parallel_size=2, tokenizer=llama-2, benchmark_enabled=false` |
| 110 | + |
| 111 | +## World Size Guidelines |
| 112 | + |
| 113 | +| World Size | Model Size Range | Example Models | |
| 114 | +|------------|------------------|----------------| |
| 115 | +| 1 | \< 2B params | TinyLlama, Qwen 0.5B, Phi-4-mini | |
| 116 | +| 2 | 2-15B params | Llama 3.1 8B, Qwen 7B, Mistral 7B | |
| 117 | +| 4 | 20-80B params | Llama 3.3 70B, QwQ 32B, Gemma 27B | |
| 118 | +| 8 | 80B+ params | DeepSeek V3, Llama 405B, Nemotron Ultra | |
| 119 | + |
| 120 | +## Model Coverage |
| 121 | + |
| 122 | +The registry contains models distributed across different GPU configurations (world sizes 1, 2, 4, and 8), including both text-only and multimodal models. |
| 123 | + |
| 124 | +**To verify current model counts and coverage:** |
| 125 | + |
| 126 | +```bash |
| 127 | +cd /path/to/autodeploy-dashboard |
| 128 | +python3 scripts/prepare_model_coverage_v2.py \ |
| 129 | + --source local \ |
| 130 | + --local-path /path/to/TensorRT-LLM \ |
| 131 | + --output /tmp/model_coverage.yaml |
| 132 | +
|
| 133 | +# View summary |
| 134 | +grep -E "^- name:|yaml_extra:" /path/to/TensorRT-LLM/examples/auto_deploy/model_registry/models.yaml | wc -l |
| 135 | +``` |
| 136 | + |
| 137 | +When adding or removing models, use `prepare_model_coverage_v2.py` to validate the registry structure and coverage. |
| 138 | + |
| 139 | +## Best Practices |
| 140 | + |
| 141 | +1. **Always include `dashboard_default.yaml` first** - it provides baseline settings |
| 142 | +1. **Always include a `world_size_N.yaml`** - defines GPU count |
| 143 | +1. **Add special configs after world_size** - they override defaults |
| 144 | +1. **Create reusable configs** - if 3+ models need same settings, make a config file |
| 145 | +1. **Use model-specific configs sparingly** - only for unique requirements |
| 146 | +1. **Test before committing** - verify with `prepare_model_coverage_v2.py` |
| 147 | + |
| 148 | +## Testing Changes |
| 149 | + |
| 150 | +```bash |
| 151 | +# Generate workload from local changes |
| 152 | +cd /path/to/autodeploy-dashboard |
| 153 | +python3 scripts/prepare_model_coverage_v2.py \ |
| 154 | + --source local \ |
| 155 | + --local-path /path/to/TensorRT-LLM \ |
| 156 | + --output /tmp/test_workload.yaml |
| 157 | +
|
| 158 | +# Verify output |
| 159 | +cat /tmp/test_workload.yaml |
| 160 | +``` |
0 commit comments