vllm-benchmark-suite 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. vllm_benchmark_suite-3.0.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  2. vllm_benchmark_suite-3.0.0/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  3. vllm_benchmark_suite-3.0.0/.github/workflows/ci.yml +30 -0
  4. vllm_benchmark_suite-3.0.0/.github/workflows/publish.yml +49 -0
  5. vllm_benchmark_suite-3.0.0/.gitignore +30 -0
  6. vllm_benchmark_suite-3.0.0/CHANGELOG.md +272 -0
  7. vllm_benchmark_suite-3.0.0/LICENSE +21 -0
  8. vllm_benchmark_suite-3.0.0/PKG-INFO +247 -0
  9. vllm_benchmark_suite-3.0.0/README.md +210 -0
  10. vllm_benchmark_suite-3.0.0/action.yml +134 -0
  11. vllm_benchmark_suite-3.0.0/grafana/dashboard.json +328 -0
  12. vllm_benchmark_suite-3.0.0/pyproject.toml +68 -0
  13. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/__init__.py +9 -0
  14. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/analysis/__init__.py +7 -0
  15. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/analysis/diagnostics.py +585 -0
  16. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/analysis/regression.py +307 -0
  17. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/analysis/scoring.py +329 -0
  18. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/cli.py +517 -0
  19. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/config.py +132 -0
  20. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/__init__.py +17 -0
  21. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/benchmark.py +444 -0
  22. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/metrics.py +429 -0
  23. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/prompts.py +327 -0
  24. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/server.py +256 -0
  25. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/core/traffic.py +466 -0
  26. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/reports/__init__.py +12 -0
  27. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/reports/charts.py +364 -0
  28. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/reports/html_report.py +289 -0
  29. vllm_benchmark_suite-3.0.0/src/vllm_benchmark/reports/terminal.py +197 -0
  30. vllm_benchmark_suite-3.0.0/tests/__init__.py +0 -0
  31. vllm_benchmark_suite-3.0.0/tests/test_diagnostics.py +65 -0
  32. vllm_benchmark_suite-3.0.0/tests/test_metrics.py +243 -0
  33. vllm_benchmark_suite-3.0.0/tests/test_prompts.py +53 -0
  34. vllm_benchmark_suite-3.0.0/tests/test_scoring.py +68 -0
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug in vllm-benchmark-suite
4
+ title: "[BUG] "
5
+ labels: bug
6
+ ---
7
+
8
+ ## Description
9
+
10
+ A clear description of the bug.
11
+
12
+ ## Steps to Reproduce
13
+
14
+ 1. Run `vllm-bench --quick`
15
+ 2. ...
16
+
17
+ ## Expected Behavior
18
+
19
+ What you expected to happen.
20
+
21
+ ## Actual Behavior
22
+
23
+ What actually happened. Include error messages and tracebacks.
24
+
25
+ ## Environment
26
+
27
+ - **OS**:
28
+ - **Python**:
29
+ - **vllm-benchmark-suite version**:
30
+ - **vLLM version**:
31
+ - **GPU**:
32
+ - **CUDA**:
33
+
34
+ ## Logs
35
+
36
+ ```
37
+ Paste relevant logs here
38
+ ```
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a feature for vllm-benchmark-suite
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ What problem does this feature solve? What pain point are you hitting?
11
+
12
+ ## Proposed Solution
13
+
14
+ How should this work from a user's perspective?
15
+
16
+ ## Alternatives Considered
17
+
18
+ Any other approaches you've thought about.
19
+
20
+ ## Additional Context
21
+
22
+ Screenshots, benchmark outputs, or examples that help illustrate the request.
@@ -0,0 +1,30 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Install dependencies
24
+ run: pip install -e ".[dev]"
25
+
26
+ - name: Lint
27
+ run: ruff check src/
28
+
29
+ - name: Test
30
+ run: pytest tests/ -v --tb=short
@@ -0,0 +1,49 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build distribution
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.11"
18
+
19
+ - name: Install build tools
20
+ run: pip install build
21
+
22
+ - name: Build package
23
+ run: python -m build
24
+
25
+ - name: Upload build artifacts
26
+ uses: actions/upload-artifact@v4
27
+ with:
28
+ name: dist
29
+ path: dist/
30
+
31
+ publish:
32
+ name: Publish to PyPI
33
+ runs-on: ubuntu-latest
34
+ needs: build
35
+ environment: pypi
36
+ permissions:
37
+ id-token: write
38
+
39
+ steps:
40
+ - name: Download build artifacts
41
+ uses: actions/download-artifact@v4
42
+ with:
43
+ name: dist
44
+ path: dist/
45
+
46
+ - name: Publish to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
48
+ with:
49
+ password: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,30 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ *.egg
9
+
10
+ # Virtual environments
11
+ .venv/
12
+ venv/
13
+
14
+ # IDE
15
+ .idea/
16
+ .vscode/
17
+ *.swp
18
+ *.swo
19
+
20
+ # Testing
21
+ .pytest_cache/
22
+ .coverage
23
+ htmlcov/
24
+
25
+ # Output
26
+ outputs/
27
+
28
+ # OS
29
+ .DS_Store
30
+ Thumbs.db
@@ -0,0 +1,272 @@
1
+ # Changelog
2
+
3
+ ## v3.0.0 - Professional Package (2026-04-16)
4
+
5
+ ### Breaking Changes
6
+ - Restructured as installable Python package: `pip install vllm-benchmark-suite`
7
+ - CLI entry point is now `vllm-bench` (replaces running scripts directly)
8
+ - Removed v1 and v2 standalone scripts
9
+
10
+ ### New Features
11
+ - **vLLM Score**: Composite benchmark score (0-10,000) with grade (S/A/B/C/D/F) — like Geekbench for vLLM
12
+ - **Auto-Diagnostics**: Plain-English analysis with actionable recommendations after every run
13
+ - **Interactive HTML Reports**: Self-contained Plotly-based reports shareable without dependencies
14
+ - **True TTFT Measurement**: SSE streaming-based Time-to-First-Token (not estimates)
15
+ - **Regression Detection**: `--compare previous.json` to catch performance regressions
16
+ - **Benchmark Presets**: `--quick` (5min), `--standard` (30min), `--thorough` (2hr)
17
+ - **Custom Prompts**: `--prompts-file my_prompts.jsonl` for production-realistic testing
18
+ - **Full CLI**: Non-interactive mode (`-y`), all parameters configurable via flags
19
+
20
+ ### Architecture
21
+ - Proper Python package with `src/` layout and `pyproject.toml`
22
+ - Modular structure: `core/`, `analysis/`, `reports/`
23
+ - 18 unit tests covering scoring, diagnostics, and prompt generation
24
+ - GitHub Actions CI for Python 3.10-3.12
25
+ - Issue templates for bug reports and feature requests
26
+
27
+ ---
28
+
29
+ ## v2.0 - Enhanced Edition (2025-10-17)
30
+
31
+ ### Major Features
32
+
33
+ #### Automatic Detection & Configuration
34
+ - **System Information Collection**: Captures Python version, platform, processor, GPU model, total VRAM, CUDA version, driver version
35
+ - **vLLM Server Discovery**: Automatic detection of:
36
+ - vLLM version
37
+ - Attention backend (FlashInfer, FlashAttention, or other)
38
+ - Quantization format (FP8, AWQ, GPTQ, INT8, INT4, FP16/BF16)
39
+ - Tensor and pipeline parallelism configuration
40
+ - Max batch size (max_num_seqs)
41
+ - GPU memory utilization
42
+ - Prefix caching status
43
+ - KV cache usage percentage
44
+ - Max model length
45
+ - Queries multiple endpoints: `/v1/models`, `/version`, `/health`, `/metrics`
46
+
47
+ #### Interactive User Interface
48
+ - **Rich Terminal UI**: Beautiful panels, tables, progress bars, and live dashboards
49
+ - **Interactive Configuration Mode**:
50
+ - Max context length selection (32K to 1M tokens)
51
+ - Max concurrent users selection (1 to 100)
52
+ - Output length presets (short/standard/long/custom)
53
+ - Visual configuration summary
54
+ - **Live Test Dashboard**: Real-time monitoring during execution
55
+ - Current test progress
56
+ - GPU metrics display
57
+ - Remaining test queue
58
+ - Test completion status
59
+ - **Enhanced Output Formatting**: Color-coded results, structured tables, professional presentation
60
+
61
+ #### Advanced Performance Metrics
62
+ - **Latency Percentiles**: P50, P90, P99 for distribution analysis
63
+ - **Inter-Token Latency (ITL)**: Average time between generated tokens
64
+ - **Prefill/Decode Time Separation**: Estimated time breakdown (15% prefill estimate)
65
+ - **Energy Efficiency Metrics**:
66
+ - Tokens per watt (instantaneous efficiency)
67
+ - Watts per token per user (normalized energy cost)
68
+ - Watts per token per user per 1K context (context-adjusted efficiency)
69
+ - Total energy consumption in watt-hours
70
+ - **Enhanced GPU Monitoring**: 0.1s polling interval (vs 1s in v1) for granular data
71
+
72
+ #### Production Enhancements
73
+ - **Model Warmup Phase**: Pre-benchmark inference to initialize GPU kernels and caches (1K context, single user, 100 tokens)
74
+ - **Output Directory Management**: Organized `./outputs` directory structure with timestamped files
75
+ - **Enhanced Metadata**: JSON results include:
76
+ - Complete system information
77
+ - vLLM server configuration
78
+ - Test parameters and configuration
79
+ - Benchmark duration and overhead breakdown
80
+ - **Comprehensive Summaries**:
81
+ - Performance highlights table (peak throughput, best efficiency, lowest latency, peak GPU)
82
+ - Energy efficiency analysis (best efficiency, total energy consumed)
83
+ - Optional detailed summary table on demand
84
+ - **Progress Tracking**: Test completion messages with key metrics during execution
85
+
86
+ ### Technical Improvements
87
+
88
+ #### Code Architecture
89
+ - **New Classes**:
90
+ - `SystemInfo`: System configuration collection
91
+ - `VLLMServerInfo`: Server capability detection
92
+ - **Enhanced GPUMonitor**: Higher frequency polling (0.1s vs 1s)
93
+ - **Live Display Integration**: Rich Live display context for real-time updates
94
+ - **Better Error Handling**: Graceful degradation when endpoints unavailable
95
+
96
+ #### Visualization Updates
97
+ - Additional charts for energy efficiency metrics
98
+ - Enhanced layout and styling
99
+ - More comprehensive metadata display
100
+ - 15+ performance graphs (vs 12 in v1)
101
+
102
+ #### Dependencies
103
+ - **New**: `rich>=13.7.0` for terminal UI
104
+ - Matplotlib backend set to "Agg" for non-interactive rendering
105
+
106
+ ### Configuration Changes
107
+
108
+ #### Constants
109
+ - `GPU_POLL_INTERVAL`: Changed from 1.0s to 0.1s (10x higher frequency)
110
+ - `OUTPUT_DIR`: New constant for output directory ("./outputs")
111
+ - `DASHBOARD_REFRESH_RATE`: New constant (2 Hz)
112
+ - Additional endpoints: `API_HEALTH_ENDPOINT`, `API_VERSION_ENDPOINT`
113
+
114
+ #### Default Model
115
+ - Changed from `Qwen/Qwen3-Next-80B-A3B-Instruct-FP8` to `Qwen/Qwen3-30B-A3B-Instruct-FP8`
116
+
117
+ ### Output Changes
118
+
119
+ #### JSON Structure
120
+ ```json
121
+ {
122
+ "metadata": {
123
+ "timestamp": "...",
124
+ "benchmark_duration": 1698.34,
125
+ "system_info": {
126
+ "python_version": "3.12.1",
127
+ "platform": "Linux-6.8.0",
128
+ "processor": "x86_64",
129
+ "cuda_version": "12.8",
130
+ "driver_version": "570.00",
131
+ "gpu_name": "NVIDIA RTX Pro 6000",
132
+ "total_vram_gb": 96.0
133
+ },
134
+ "server_info": {
135
+ "model_name": "...",
136
+ "version": "0.6.8",
137
+ "backend": "FlashInfer",
138
+ "quantization": "FP8",
139
+ "tensor_parallel": 1,
140
+ "max_num_seqs": 256,
141
+ "gpu_memory_utilization": 0.95,
142
+ "prefix_caching": true,
143
+ "kv_cache_usage": 65.3,
144
+ "max_model_len": 262144
145
+ },
146
+ "configuration": {
147
+ "context_lengths": [...],
148
+ "concurrent_users": [...],
149
+ "output_tokens": 500,
150
+ "pause_duration": 5
151
+ }
152
+ },
153
+ "results": [...]
154
+ }
155
+ ```
156
+
157
+ #### Per-Test Results
158
+ New fields added:
159
+ - `inter_token_latency`: Average ITL in seconds
160
+ - `prefill_time_estimate`: Estimated prefill time
161
+ - `decode_time_estimate`: Estimated decode time
162
+ - `tokens_per_watt`: Instantaneous efficiency
163
+ - `watts_per_token`: Power cost per token
164
+ - `watts_per_token_per_user`: Normalized power cost
165
+ - `watts_per_token_per_user_per_1k_context`: Context-adjusted efficiency
166
+ - `energy_watt_hours`: Total energy consumed in test
167
+ - Enhanced GPU metrics with additional clock frequency data
168
+
169
+ ### User Experience Improvements
170
+
171
+ #### Before Benchmark
172
+ - System information panel with GPU details
173
+ - vLLM configuration panel with server details
174
+ - Interactive prompts with visual feedback
175
+ - Configuration summary table
176
+ - Estimated benchmark duration
177
+ - Warmup phase with success confirmation
178
+
179
+ #### During Benchmark
180
+ - Live dashboard with real-time updates
181
+ - Progress indication (test X of Y)
182
+ - GPU utilization monitoring
183
+ - Test queue display
184
+ - Completion messages with key metrics
185
+
186
+ #### After Benchmark
187
+ - Performance highlights table
188
+ - Energy efficiency analysis table
189
+ - File output locations with clickable links
190
+ - Total benchmark time with overhead breakdown
191
+ - Optional detailed summary table
192
+ - Professional summary formatting
193
+
194
+ ### Breaking Changes
195
+
196
+ None - v2 maintains backward compatibility with v1. The main script name changed from `benchmark_qwen3_contexts_professional.py` to `vllm_benchmark_suitev2.py`, but functionality is backward compatible.
197
+
198
+ ### Deprecations
199
+
200
+ None
201
+
202
+ ### Migration Guide
203
+
204
+ **From v1 to v2:**
205
+
206
+ 1. Install Rich library:
207
+ ```bash
208
+ pip install rich>=13.7.0
209
+ ```
210
+
211
+ 2. Use new script name:
212
+ ```bash
213
+ python vllm_benchmark_suitev2.py
214
+ ```
215
+
216
+ 3. Interactive mode handles configuration automatically
217
+
218
+ 4. Old v1 JSON results can still be visualized with v2 code (metadata fields optional)
219
+
220
+ ### Bug Fixes
221
+
222
+ - Improved error handling for missing nvidia-smi
223
+ - Better handling of server endpoint unavailability
224
+ - Graceful degradation when metrics endpoint not available
225
+ - Fixed potential race conditions in GPU monitoring thread
226
+
227
+ ### Performance Optimizations
228
+
229
+ - Higher frequency GPU polling for better granularity
230
+ - Reduced overhead between tests
231
+ - More efficient thread management
232
+ - Optimized visualization generation
233
+
234
+ ### Testing
235
+
236
+ Tested on:
237
+ - RTX Pro 6000 Blackwell (96GB VRAM)
238
+ - RTX 5090 (32GB VRAM)
239
+ - Ubuntu 22.04 LTS
240
+ - Python 3.10, 3.11, 3.12
241
+ - vLLM versions 0.6.6, 0.6.7, 0.6.8
242
+ - Multiple model formats (FP8, AWQ, GPTQ)
243
+
244
+ ### Known Issues
245
+
246
+ - Rich terminal UI may not render correctly in some legacy terminals (workaround: set `TERM=xterm-256color`)
247
+ - Very large context lengths (>512K) may require increasing `REQUEST_TIMEOUT`
248
+ - Metrics endpoint not available in older vLLM versions (gracefully handled)
249
+
250
+ ### Roadmap for v2.1
251
+
252
+ Planned features:
253
+ - CLI argument parsing for non-interactive mode
254
+ - Multi-GPU benchmarking support
255
+ - Streaming latency metrics (TTFT, ITL tracking per token)
256
+ - Comparative analysis mode (multiple runs comparison)
257
+ - Export to CSV/Excel formats
258
+ - Automated performance regression detection
259
+ - Integration with monitoring systems (Prometheus, Grafana)
260
+
261
+ ---
262
+
263
+ ## v1.0 - Initial Release (2025-10-16)
264
+
265
+ Initial release with:
266
+ - Multi-context benchmarking (1K to 256K)
267
+ - Concurrency testing (1-10 users)
268
+ - GPU monitoring (nvidia-smi, 1s intervals)
269
+ - Basic performance metrics (latency, throughput, TTFT)
270
+ - 12 visualization charts
271
+ - JSON output
272
+ - Console summary tables
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 amit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.