guidellm 0.3.0rc20250507__py3-none-any.whl → 0.4.0a2__py3-none-any.whl

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.

Potentially problematic release.


This version of guidellm might be problematic. Click here for more details.

Files changed (55) hide show
  1. guidellm/__init__.py +8 -13
  2. guidellm/__main__.py +290 -69
  3. guidellm/backend/__init__.py +6 -6
  4. guidellm/backend/backend.py +25 -4
  5. guidellm/backend/openai.py +147 -27
  6. guidellm/backend/response.py +6 -2
  7. guidellm/benchmark/__init__.py +16 -22
  8. guidellm/benchmark/aggregator.py +3 -3
  9. guidellm/benchmark/benchmark.py +11 -12
  10. guidellm/benchmark/benchmarker.py +2 -2
  11. guidellm/benchmark/entrypoints.py +34 -10
  12. guidellm/benchmark/output.py +57 -5
  13. guidellm/benchmark/profile.py +4 -4
  14. guidellm/benchmark/progress.py +2 -2
  15. guidellm/benchmark/scenario.py +104 -0
  16. guidellm/benchmark/scenarios/__init__.py +0 -0
  17. guidellm/config.py +28 -7
  18. guidellm/dataset/__init__.py +4 -4
  19. guidellm/dataset/creator.py +1 -1
  20. guidellm/dataset/synthetic.py +36 -11
  21. guidellm/logger.py +8 -4
  22. guidellm/objects/__init__.py +2 -2
  23. guidellm/objects/pydantic.py +30 -1
  24. guidellm/objects/statistics.py +20 -14
  25. guidellm/preprocess/__init__.py +3 -0
  26. guidellm/preprocess/dataset.py +374 -0
  27. guidellm/presentation/__init__.py +28 -0
  28. guidellm/presentation/builder.py +27 -0
  29. guidellm/presentation/data_models.py +232 -0
  30. guidellm/presentation/injector.py +66 -0
  31. guidellm/request/__init__.py +6 -3
  32. guidellm/request/loader.py +5 -5
  33. guidellm/{scheduler → request}/types.py +4 -1
  34. guidellm/scheduler/__init__.py +10 -15
  35. guidellm/scheduler/queues.py +25 -0
  36. guidellm/scheduler/result.py +21 -3
  37. guidellm/scheduler/scheduler.py +68 -60
  38. guidellm/scheduler/strategy.py +26 -24
  39. guidellm/scheduler/worker.py +64 -103
  40. guidellm/utils/__init__.py +17 -5
  41. guidellm/utils/cli.py +62 -0
  42. guidellm/utils/default_group.py +105 -0
  43. guidellm/utils/dict.py +23 -0
  44. guidellm/utils/hf_datasets.py +36 -0
  45. guidellm/utils/random.py +1 -1
  46. guidellm/utils/text.py +12 -5
  47. guidellm/version.py +6 -0
  48. guidellm-0.4.0a2.dist-info/METADATA +317 -0
  49. guidellm-0.4.0a2.dist-info/RECORD +62 -0
  50. {guidellm-0.3.0rc20250507.dist-info → guidellm-0.4.0a2.dist-info}/WHEEL +1 -1
  51. guidellm-0.3.0rc20250507.dist-info/METADATA +0 -451
  52. guidellm-0.3.0rc20250507.dist-info/RECORD +0 -48
  53. {guidellm-0.3.0rc20250507.dist-info → guidellm-0.4.0a2.dist-info}/entry_points.txt +0 -0
  54. {guidellm-0.3.0rc20250507.dist-info → guidellm-0.4.0a2.dist-info}/licenses/LICENSE +0 -0
  55. {guidellm-0.3.0rc20250507.dist-info → guidellm-0.4.0a2.dist-info}/top_level.txt +0 -0
@@ -1,451 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: guidellm
3
- Version: 0.3.0rc20250507
4
- Summary: Guidance platform for deploying and managing large language models.
5
- Author: Neuralmagic, Inc.
6
- License: Apache License
7
- Version 2.0, January 2004
8
- http://www.apache.org/licenses/
9
-
10
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
-
12
- 1. Definitions.
13
-
14
- "License" shall mean the terms and conditions for use, reproduction,
15
- and distribution as defined by Sections 1 through 9 of this document.
16
-
17
- "Licensor" shall mean the copyright owner or entity authorized by
18
- the copyright owner that is granting the License.
19
-
20
- "Legal Entity" shall mean the union of the acting entity and all
21
- other entities that control, are controlled by, or are under common
22
- control with that entity. For the purposes of this definition,
23
- "control" means (i) the power, direct or indirect, to cause the
24
- direction or management of such entity, whether by contract or
25
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
- outstanding shares, or (iii) beneficial ownership of such entity.
27
-
28
- "You" (or "Your") shall mean an individual or Legal Entity
29
- exercising permissions granted by this License.
30
-
31
- "Source" form shall mean the preferred form for making modifications,
32
- including but not limited to software source code, documentation
33
- source, and configuration files.
34
-
35
- "Object" form shall mean any form resulting from mechanical
36
- transformation or translation of a Source form, including but
37
- not limited to compiled object code, generated documentation,
38
- and conversions to other media types.
39
-
40
- "Work" shall mean the work of authorship, whether in Source or
41
- Object form, made available under the License, as indicated by a
42
- copyright notice that is included in or attached to the work
43
- (an example is provided in the Appendix below).
44
-
45
- "Derivative Works" shall mean any work, whether in Source or Object
46
- form, that is based on (or derived from) the Work and for which the
47
- editorial revisions, annotations, elaborations, or other modifications
48
- represent, as a whole, an original work of authorship. For the purposes
49
- of this License, Derivative Works shall not include works that remain
50
- separable from, or merely link (or bind by name) to the interfaces of,
51
- the Work and Derivative Works thereof.
52
-
53
- "Contribution" shall mean any work of authorship, including
54
- the original version of the Work and any modifications or additions
55
- to that Work or Derivative Works thereof, that is intentionally
56
- submitted to Licensor for inclusion in the Work by the copyright owner
57
- or by an individual or Legal Entity authorized to submit on behalf of
58
- the copyright owner. For the purposes of this definition, "submitted"
59
- means any form of electronic, verbal, or written communication sent
60
- to the Licensor or its representatives, including but not limited to
61
- communication on electronic mailing lists, source code control systems,
62
- and issue tracking systems that are managed by, or on behalf of, the
63
- Licensor for the purpose of discussing and improving the Work, but
64
- excluding communication that is conspicuously marked or otherwise
65
- designated in writing by the copyright owner as "Not a Contribution."
66
-
67
- "Contributor" shall mean Licensor and any individual or Legal Entity
68
- on behalf of whom a Contribution has been received by Licensor and
69
- subsequently incorporated within the Work.
70
-
71
- 2. Grant of Copyright License. Subject to the terms and conditions of
72
- this License, each Contributor hereby grants to You a perpetual,
73
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
- copyright license to reproduce, prepare Derivative Works of,
75
- publicly display, publicly perform, sublicense, and distribute the
76
- Work and such Derivative Works in Source or Object form.
77
-
78
- 3. Grant of Patent License. Subject to the terms and conditions of
79
- this License, each Contributor hereby grants to You a perpetual,
80
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
- (except as stated in this section) patent license to make, have made,
82
- use, offer to sell, sell, import, and otherwise transfer the Work,
83
- where such license applies only to those patent claims licensable
84
- by such Contributor that are necessarily infringed by their
85
- Contribution(s) alone or by combination of their Contribution(s)
86
- with the Work to which such Contribution(s) was submitted. If You
87
- institute patent litigation against any entity (including a
88
- cross-claim or counterclaim in a lawsuit) alleging that the Work
89
- or a Contribution incorporated within the Work constitutes direct
90
- or contributory patent infringement, then any patent licenses
91
- granted to You under this License for that Work shall terminate
92
- as of the date such litigation is filed.
93
-
94
- 4. Redistribution. You may reproduce and distribute copies of the
95
- Work or Derivative Works thereof in any medium, with or without
96
- modifications, and in Source or Object form, provided that You
97
- meet the following conditions:
98
-
99
- (a) You must give any other recipients of the Work or
100
- Derivative Works a copy of this License; and
101
-
102
- (b) You must cause any modified files to carry prominent notices
103
- stating that You changed the files; and
104
-
105
- (c) You must retain, in the Source form of any Derivative Works
106
- that You distribute, all copyright, patent, trademark, and
107
- attribution notices from the Source form of the Work,
108
- excluding those notices that do not pertain to any part of
109
- the Derivative Works; and
110
-
111
- (d) If the Work includes a "NOTICE" text file as part of its
112
- distribution, then any Derivative Works that You distribute must
113
- include a readable copy of the attribution notices contained
114
- within such NOTICE file, excluding those notices that do not
115
- pertain to any part of the Derivative Works, in at least one
116
- of the following places: within a NOTICE text file distributed
117
- as part of the Derivative Works; within the Source form or
118
- documentation, if provided along with the Derivative Works; or,
119
- within a display generated by the Derivative Works, if and
120
- wherever such third-party notices normally appear. The contents
121
- of the NOTICE file are for informational purposes only and
122
- do not modify the License. You may add Your own attribution
123
- notices within Derivative Works that You distribute, alongside
124
- or as an addendum to the NOTICE text from the Work, provided
125
- that such additional attribution notices cannot be construed
126
- as modifying the License.
127
-
128
- You may add Your own copyright statement to Your modifications and
129
- may provide additional or different license terms and conditions
130
- for use, reproduction, or distribution of Your modifications, or
131
- for any such Derivative Works as a whole, provided Your use,
132
- reproduction, and distribution of the Work otherwise complies with
133
- the conditions stated in this License.
134
-
135
- 5. Submission of Contributions. Unless You explicitly state otherwise,
136
- any Contribution intentionally submitted for inclusion in the Work
137
- by You to the Licensor shall be under the terms and conditions of
138
- this License, without any additional terms or conditions.
139
- Notwithstanding the above, nothing herein shall supersede or modify
140
- the terms of any separate license agreement you may have executed
141
- with Licensor regarding such Contributions.
142
-
143
- 6. Trademarks. This License does not grant permission to use the trade
144
- names, trademarks, service marks, or product names of the Licensor,
145
- except as required for reasonable and customary use in describing the
146
- origin of the Work and reproducing the content of the NOTICE file.
147
-
148
- 7. Disclaimer of Warranty. Unless required by applicable law or
149
- agreed to in writing, Licensor provides the Work (and each
150
- Contributor provides its Contributions) on an "AS IS" BASIS,
151
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
- implied, including, without limitation, any warranties or conditions
153
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
- PARTICULAR PURPOSE. You are solely responsible for determining the
155
- appropriateness of using or redistributing the Work and assume any
156
- risks associated with Your exercise of permissions under this License.
157
-
158
- 8. Limitation of Liability. In no event and under no legal theory,
159
- whether in tort (including negligence), contract, or otherwise,
160
- unless required by applicable law (such as deliberate and grossly
161
- negligent acts) or agreed to in writing, shall any Contributor be
162
- liable to You for damages, including any direct, indirect, special,
163
- incidental, or consequential damages of any character arising as a
164
- result of this License or out of the use or inability to use the
165
- Work (including but not limited to damages for loss of goodwill,
166
- work stoppage, computer failure or malfunction, or any and all
167
- other commercial damages or losses), even if such Contributor
168
- has been advised of the possibility of such damages.
169
-
170
- 9. Accepting Warranty or Additional Liability. While redistributing
171
- the Work or Derivative Works thereof, You may choose to offer,
172
- and charge a fee for, acceptance of support, warranty, indemnity,
173
- or other liability obligations and/or rights consistent with this
174
- License. However, in accepting such obligations, You may act only
175
- on Your own behalf and on Your sole responsibility, not on behalf
176
- of any other Contributor, and only if You agree to indemnify,
177
- defend, and hold each Contributor harmless for any liability
178
- incurred by, or claims asserted against, such Contributor by reason
179
- of your accepting any such warranty or additional liability.
180
-
181
- END OF TERMS AND CONDITIONS
182
-
183
- APPENDIX: How to apply the Apache License to your work.
184
-
185
- To apply the Apache License to your work, attach the following
186
- boilerplate notice, with the fields enclosed by brackets "[]"
187
- replaced with your own identifying information. (Don't include
188
- the brackets!) The text should be enclosed in the appropriate
189
- comment syntax for the file format. We also recommend that a
190
- file or class name and description of purpose be included on the
191
- same "printed page" as the copyright notice for easier
192
- identification within third-party archives.
193
-
194
- Copyright [yyyy] [name of copyright owner]
195
-
196
- Licensed under the Apache License, Version 2.0 (the "License");
197
- you may not use this file except in compliance with the License.
198
- You may obtain a copy of the License at
199
-
200
- http://www.apache.org/licenses/LICENSE-2.0
201
-
202
- Unless required by applicable law or agreed to in writing, software
203
- distributed under the License is distributed on an "AS IS" BASIS,
204
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
- See the License for the specific language governing permissions and
206
- limitations under the License.
207
-
208
- Project-URL: homepage, https://github.com/neuralmagic/guidellm
209
- Requires-Python: <4.0,>=3.9.0
210
- Description-Content-Type: text/markdown
211
- License-File: LICENSE
212
- Requires-Dist: click
213
- Requires-Dist: datasets
214
- Requires-Dist: ftfy>=6.0.0
215
- Requires-Dist: httpx[http2]<1.0.0
216
- Requires-Dist: loguru
217
- Requires-Dist: numpy
218
- Requires-Dist: pillow
219
- Requires-Dist: protobuf
220
- Requires-Dist: pydantic>=2.0.0
221
- Requires-Dist: pydantic-settings>=2.0.0
222
- Requires-Dist: pyyaml>=6.0.0
223
- Requires-Dist: requests
224
- Requires-Dist: rich
225
- Requires-Dist: transformers
226
- Provides-Extra: dev
227
- Requires-Dist: pre-commit~=3.5.0; extra == "dev"
228
- Requires-Dist: scipy~=1.10; extra == "dev"
229
- Requires-Dist: sphinx~=7.1.2; extra == "dev"
230
- Requires-Dist: tox~=4.16.0; extra == "dev"
231
- Requires-Dist: lorem~=0.1.1; extra == "dev"
232
- Requires-Dist: pytest~=8.2.2; extra == "dev"
233
- Requires-Dist: pytest-asyncio~=0.23.8; extra == "dev"
234
- Requires-Dist: pytest-cov~=5.0.0; extra == "dev"
235
- Requires-Dist: pytest-mock~=3.14.0; extra == "dev"
236
- Requires-Dist: pytest-rerunfailures~=14.0; extra == "dev"
237
- Requires-Dist: requests-mock~=1.12.1; extra == "dev"
238
- Requires-Dist: respx~=0.22.0; extra == "dev"
239
- Requires-Dist: mypy~=1.10.1; extra == "dev"
240
- Requires-Dist: ruff~=0.5.2; extra == "dev"
241
- Requires-Dist: mdformat~=0.7.17; extra == "dev"
242
- Requires-Dist: mdformat-footnote~=0.1.1; extra == "dev"
243
- Requires-Dist: mdformat-frontmatter~=2.0.8; extra == "dev"
244
- Requires-Dist: mdformat-gfm~=0.3.6; extra == "dev"
245
- Requires-Dist: types-click~=7.1.8; extra == "dev"
246
- Requires-Dist: types-PyYAML~=6.0.1; extra == "dev"
247
- Requires-Dist: types-requests~=2.32.0; extra == "dev"
248
- Requires-Dist: types-toml; extra == "dev"
249
- Dynamic: license-file
250
-
251
- <p align="center">
252
- <picture>
253
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/guidellm-logo-light.png">
254
- <img alt="GuideLLM Logo" src="https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/guidellm-logo-dark.png" width=55%>
255
- </picture>
256
- </p>
257
-
258
- <h3 align="center">
259
- Scale Efficiently: Evaluate and Optimize Your LLM Deployments for Real-World Inference
260
- </h3>
261
-
262
- [![GitHub Release](https://img.shields.io/github/release/neuralmagic/guidellm.svg?label=Version)](https://github.com/neuralmagic/guidellm/releases) [![Documentation](https://img.shields.io/badge/Documentation-8A2BE2?logo=read-the-docs&logoColor=%23ffffff&color=%231BC070)](https://github.com/neuralmagic/guidellm/tree/main/docs) [![License](https://img.shields.io/github/license/neuralmagic/guidellm.svg)](https://github.com/neuralmagic/guidellm/blob/main/LICENSE) [![PyPI Release](https://img.shields.io/pypi/v/guidellm.svg?label=PyPI%20Release)](https://pypi.python.org/pypi/guidellm) [![Python Versions](https://img.shields.io/badge/Python-3.9--3.13-orange)](https://pypi.python.org/pypi/guidellm) [![Nightly Build](https://img.shields.io/github/actions/workflow/status/neuralmagic/guidellm/nightly.yml?branch=main&label=Nightly%20Build)](https://github.com/neuralmagic/guidellm/actions/workflows/nightly.yml)
263
-
264
- ## Overview
265
-
266
- <p>
267
- <picture>
268
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/guidellm-user-flows-dark.png">
269
- <img alt="GuideLLM User Flows" src="https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/guidellm-user-flows-light.png">
270
- </picture>
271
- </p>
272
-
273
- **GuideLLM** is a platform for evaluating and optimizing the deployment of large language models (LLMs). By simulating real-world inference workloads, GuideLLM enables users to assess the performance, resource requirements, and cost implications of deploying LLMs on various hardware configurations. This approach ensures efficient, scalable, and cost-effective LLM inference serving while maintaining high service quality.
274
-
275
- ### Key Features
276
-
277
- - **Performance Evaluation:** Analyze LLM inference under different load scenarios to ensure your system meets your service level objectives (SLOs).
278
- - **Resource Optimization:** Determine the most suitable hardware configurations for running your models effectively.
279
- - **Cost Estimation:** Understand the financial impact of different deployment strategies and make informed decisions to minimize costs.
280
- - **Scalability Testing:** Simulate scaling to handle large numbers of concurrent users without performance degradation.
281
-
282
- ## Getting Started
283
-
284
- ### Installation
285
-
286
- Before installing, ensure you have the following prerequisites:
287
-
288
- - OS: Linux or MacOS
289
- - Python: 3.9 – 3.13
290
-
291
- The latest GuideLLM release can be installed using pip:
292
-
293
- ```bash
294
- pip install guidellm
295
- ```
296
-
297
- Or from source code using pip:
298
-
299
- ```bash
300
- pip install git+https://github.com/neuralmagic/guidellm.git
301
- ```
302
-
303
- For detailed installation instructions and requirements, see the [Installation Guide](https://github.com/neuralmagic/guidellm/tree/main/docs/install.md).
304
-
305
- ### Quick Start
306
-
307
- #### 1. Start an OpenAI Compatible Server (vLLM)
308
-
309
- GuideLLM requires an OpenAI-compatible server to run evaluations. [vLLM](https://github.com/vllm-project/vllm) is recommended for this purpose. After installing vLLM on your desired server (`pip install vllm`), start a vLLM server with a Llama 3.1 8B quantized model by running the following command:
310
-
311
- ```bash
312
- vllm serve "neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"
313
- ```
314
-
315
- For more information on starting a vLLM server, see the [vLLM Documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html).
316
-
317
- For information on starting other supported inference servers or platforms, see the [Supported Backends documentation](https://github.com/neuralmagic/guidellm/tree/main/docs/backends.md).
318
-
319
- #### 2. Run a GuideLLM Benchmark
320
-
321
- To run a GuideLLM benchmark, use the `guidellm benchmark` command with the target set to an OpenAI-compatible server. For this example, the target is set to 'http://localhost:8000', assuming that vLLM is active and running on the same server. Otherwise, update it to the appropriate location. By default, GuideLLM automatically determines the model available on the server and uses it. To target a different model, pass the desired name with the `--model` argument. Additionally, the `--rate-type` is set to `sweep`, which automatically runs a range of benchmarks to determine the minimum and maximum rates that the server and model can support. Each benchmark run under the sweep will run for 30 seconds, as set by the `--max-seconds` argument. Finally, `--data` is set to a synthetic dataset with 256 prompt tokens and 128 output tokens per request. For more arguments, supported scenarios, and configurations, jump to the [Configurations Section](#configurations) or run `guidellm benchmark --help`.
322
-
323
- Now, to start benchmarking, run the following command:
324
-
325
- ```bash
326
- guidellm benchmark \
327
- --target "http://localhost:8000" \
328
- --rate-type sweep \
329
- --max-seconds 30 \
330
- --data "prompt_tokens=256,output_tokens=128"
331
- ```
332
-
333
- The above command will begin the evaluation and provide progress updates similar to the following: <img src= "https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/sample-benchmarks.gif"/>
334
-
335
- #### 3. Analyze the Results
336
-
337
- After the evaluation is completed, GuideLLM will summarize the results into three sections:
338
-
339
- 1. Benchmarks Metadata: A summary of the benchmark run and the arguments used to create it, including the server, data, profile, and more.
340
- 2. Benchmarks Info: A high-level view of each benchmark and the requests that were run, including the type, duration, request statuses, and number of tokens.
341
- 3. Benchmarks Stats: A summary of the statistics for each benchmark run, including the request rate, concurrency, latency, and token-level metrics such as TTFT, ITL, and more.
342
-
343
- The sections will look similar to the following: <img alt="Sample GuideLLM benchmark output" src="https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/assets/sample-output.png" />
344
-
345
- For more details about the metrics and definitions, please refer to the [Metrics documentation](https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/metrics.md).
346
-
347
- #### 4. Explore the Results File
348
-
349
- By default, the full results, including complete statistics and request data, are saved to a file `benchmarks.json` in the current working directory. This file can be used for further analysis or reporting, and additionally can be reloaded into Python for further analysis using the `guidellm.benchmark.GenerativeBenchmarksReport` class. You can specify a different file name and extension with the `--output` argument.
350
-
351
- For more details about the supported output file types, please take a look at the [Outputs documentation](raw.githubusercontent.com/neuralmagic/guidellm/main/docs/outputs.md).
352
-
353
- #### 5. Use the Results
354
-
355
- The results from GuideLLM are used to optimize your LLM deployment for performance, resource efficiency, and cost. By analyzing the performance metrics, you can identify bottlenecks, determine the optimal request rate, and select the most cost-effective hardware configuration for your deployment.
356
-
357
- For example, when deploying a chat application, we likely want to ensure that our time to first token (TTFT) and inter-token latency (ITL) are under certain thresholds to meet our service level objectives (SLOs) or service level agreements (SLAs). For example, setting TTFT to 200ms and ITL 25ms for the sample data provided in the example above, we can see that even though the server is capable of handling up to 13 requests per second, we would only be able to meet our SLOs for 99% of users at a request rate of 3.5 requests per second. If we relax our constraints on ITL to 50 ms, then we can meet the TTFT SLA for 99% of users at a request rate of approximately 10 requests per second.
358
-
359
- For further details on determining the optimal request rate and SLOs, refer to the [SLOs documentation](https://raw.githubusercontent.com/neuralmagic/guidellm/main/docs/service_level_objectives.md).
360
-
361
- ### Configurations
362
-
363
- GuideLLM offers a range of configurations through both the benchmark CLI command and environment variables, which provide default values and more granular controls. The most common configurations are listed below. A complete list is easily accessible, though, by running `guidellm benchmark --help` or `guidellm config` respectively.
364
-
365
- #### Benchmark CLI
366
-
367
- The `guidellm benchmark` command is used to run benchmarks against a generative AI backend/server. The command accepts a variety of arguments to customize the benchmark run. The most common arguments include:
368
-
369
- - `--target`: Specifies the target path for the backend to run benchmarks against. For example, `http://localhost:8000`. This is required to define the server endpoint.
370
-
371
- - `--model`: Allows selecting a specific model from the server. If not provided, it defaults to the first model available on the server. Useful when multiple models are hosted on the same server.
372
-
373
- - `--processor`: Used only for synthetic data creation or when the token source configuration is set to local for calculating token metrics locally. It must match the model's processor or tokenizer to ensure compatibility and correctness. This supports either a HuggingFace model ID or a local path to a processor or tokenizer.
374
-
375
- - `--data`: Specifies the dataset to use. This can be a HuggingFace dataset ID, a local path to a dataset, or standard text files such as CSV, JSONL, and more. Additionally, synthetic data configurations can be provided using JSON or key-value strings. Synthetic data options include:
376
-
377
- - `prompt_tokens`: Average number of tokens for prompts.
378
- - `output_tokens`: Average number of tokens for outputs.
379
- - `TYPE_stdev`, `TYPE_min`, `TYPE_max`: Standard deviation, minimum, and maximum values for the specified type (e.g., `prompt_tokens`, `output_tokens`). If not provided, will use the provided tokens value only.
380
- - `samples`: Number of samples to generate, defaults to 1000.
381
- - `source`: Source text data for generation, defaults to a local copy of Pride and Prejudice.
382
-
383
- - `--data-args`: A JSON string used to specify the columns to source data from (e.g., `prompt_column`, `output_tokens_count_column`) and additional arguments to pass into the HuggingFace datasets constructor.
384
-
385
- - `--data-sampler`: Enables applying `random` shuffling or sampling to the dataset. If not set, no sampling is used.
386
-
387
- - `--rate-type`: Defines the type of benchmark to run (default sweep). Supported types include:
388
-
389
- - `synchronous`: Runs a single stream of requests one at a time. `--rate` must not be set for this mode.
390
- - `throughput`: Runs all requests in parallel to measure the maximum throughput for the server (bounded by GUIDELLM\_\_MAX_CONCURRENCY config argument). `--rate` must not be set for this mode.
391
- - `concurrent`: Runs a fixed number of streams of requests in parallel. `--rate` must be set to the desired concurrency level/number of streams.
392
- - `constant`: Sends requests asynchronously at a constant rate set by `--rate`.
393
- - `poisson`: Sends requests at a rate following a Poisson distribution with the mean set by `--rate`.
394
- - `sweep`: Automatically determines the minimum and maximum rates the server can support by running synchronous and throughput benchmarks, and then runs a series of benchmarks equally spaced between the two rates. The number of benchmarks is set by `--rate` (default is 10).
395
-
396
- - `--max-seconds`: Sets the maximum duration (in seconds) for each benchmark run. If not specified, the benchmark will run until the dataset is exhausted or the `--max-requests` limit is reached.
397
-
398
- - `--max-requests`: Sets the maximum number of requests for each benchmark run. If not provided, the benchmark will run until `--max-seconds` is reached or the dataset is exhausted.
399
-
400
- - `--warmup-percent`: Specifies the percentage of the benchmark to treat as a warmup phase. Requests during this phase are excluded from the final results.
401
-
402
- - `--cooldown-percent`: Specifies the percentage of the benchmark to treat as a cooldown phase. Requests during this phase are excluded from the final results.
403
-
404
- - `--output-path`: Defines the path to save the benchmark results. Supports JSON, YAML, or CSV formats. If a directory is provided, the results will be saved as `benchmarks.json` in that directory. If not set, the results will be saved in the current working directory.
405
-
406
- ## Resources
407
-
408
- ### Documentation
409
-
410
- Our comprehensive documentation offers detailed guides and resources to help you maximize the benefits of GuideLLM. Whether just getting started or looking to dive deeper into advanced topics, you can find what you need in our [documentation](https://github.com/neuralmagic/guidellm/tree/main/docs).
411
-
412
- ### Core Docs
413
-
414
- - [**Installation Guide**](https://github.com/neuralmagic/guidellm/tree/main/docs/install.md) - This guide provides step-by-step instructions for installing GuideLLM, including prerequisites and setup tips.
415
- - [**Backends Guide**](https://github.com/neuralmagic/guidellm/tree/main/docs/backends.md) - A comprehensive overview of supported backends and how to set them up for use with GuideLLM.
416
- - [**Metrics Guide**](https://github.com/neuralmagic/guidellm/tree/main/docs/metrics.md) - Detailed explanations of the metrics used in GuideLLM, including definitions and how to interpret them.
417
- - [**Outputs Guide**](https://github.com/neuralmagic/guidellm/tree/main/docs/outputs.md) - Information on the different output formats supported by GuideLLM and how to use them.
418
- - [**Architecture Overview**](https://github.com/neuralmagic/guidellm/tree/main/docs/architecture.md) - A detailed look at GuideLLM's design, components, and how they interact.
419
-
420
- ### Supporting External Documentation
421
-
422
- - [**vLLM Documentation**](https://vllm.readthedocs.io/en/latest/) - Official vLLM documentation provides insights into installation, usage, and supported models.
423
-
424
- ### Contribution Docs
425
-
426
- We appreciate contributions to the code, examples, integrations, documentation, bug reports, and feature requests! Your feedback and involvement are crucial in helping GuideLLM grow and improve. Below are some ways you can get involved:
427
-
428
- - [**DEVELOPING.md**](https://github.com/neuralmagic/guidellm/blob/main/DEVELOPING.md) - Development guide for setting up your environment and making contributions.
429
- - [**CONTRIBUTING.md**](https://github.com/neuralmagic/guidellm/blob/main/CONTRIBUTING.md) - Guidelines for contributing to the project, including code standards, pull request processes, and more.
430
- - [**CODE_OF_CONDUCT.md**](https://github.com/neuralmagic/guidellm/blob/main/CODE_OF_CONDUCT.md) - Our expectations for community behavior to ensure a welcoming and inclusive environment.
431
-
432
- ### Releases
433
-
434
- Visit our [GitHub Releases page](https://github.com/neuralmagic/guidellm/releases) and review the release notes to stay updated with the latest releases.
435
-
436
- ### License
437
-
438
- GuideLLM is licensed under the [Apache License 2.0](https://github.com/neuralmagic/guidellm/blob/main/LICENSE).
439
-
440
- ### Cite
441
-
442
- If you find GuideLLM helpful in your research or projects, please consider citing it:
443
-
444
- ```bibtex
445
- @misc{guidellm2024,
446
- title={GuideLLM: Scalable Inference and Optimization for Large Language Models},
447
- author={Neural Magic, Inc.},
448
- year={2024},
449
- howpublished={\url{https://github.com/neuralmagic/guidellm}},
450
- }
451
- ```
@@ -1,48 +0,0 @@
1
- guidellm/__init__.py,sha256=w-LiDNg-LlzW18ppyjN_ZNE63QRn5qSQ1b4EKCKYz7U,1166
2
- guidellm/__main__.py,sha256=P90X5gCGU9uDXxW2tFmgseGdq5Kv3U1GgPdQxmYwFHk,7911
3
- guidellm/config.py,sha256=sCR_n7483C_pr8M0yVYbDdF5zvokEvamz_TfpYHhP0I,6045
4
- guidellm/logger.py,sha256=O4sU2QKHn_swJIEmayiEt6nIXzGHGmXqZ_Mg8CdIE5Q,2609
5
- guidellm/backend/__init__.py,sha256=KiYvI8Yllx12bXJX7cBRjzxdUERih5DEGQrHmbIG_0Q,489
6
- guidellm/backend/backend.py,sha256=C8zVY6Gq32OInBkc_Czm9SxByWWi4jeXSHt7rtQ3WAY,8971
7
- guidellm/backend/openai.py,sha256=oCjofc6ajeeG3z6rBITnrNCBk90zP3AUZ6NMnJ5HUPo,22265
8
- guidellm/backend/response.py,sha256=lTT-x7aa9OdrlVzeqBQH0pj6vTk6vcN_ADWH6-kVGF8,4911
9
- guidellm/benchmark/__init__.py,sha256=y4BLdTRT1QdiMM2paJBEiPLJgKs2Hinsclc82rGs7ck,1887
10
- guidellm/benchmark/aggregator.py,sha256=RXdnVDSMBtwsFeBx1OH_Jh1uqyBEDQkbaeJeylwHmz4,31312
11
- guidellm/benchmark/benchmark.py,sha256=NiWKosHDLM33uvXc3-Ij7H1ZMU46B1befkwsbkWIVjw,31814
12
- guidellm/benchmark/benchmarker.py,sha256=aiJGkOPZYhVDQiEaLDSC3925J2Z2ACyvsKXFCOLejj0,11738
13
- guidellm/benchmark/entrypoints.py,sha256=OOi0B7-CMicbFEU2bzN2_OtUO8ybS-mFR3SHoZdDjK0,4930
14
- guidellm/benchmark/output.py,sha256=uOlT0eOmj1K7uzNyBHTokbGG_C8rscXYoiWpRrD7Tm8,34646
15
- guidellm/benchmark/profile.py,sha256=x136vEuqrXBoacPWXXOX-g8Oej0rYOhC-5E4DXaCvyg,13091
16
- guidellm/benchmark/progress.py,sha256=NbaR3sriHGmfqmvnFqSIR7qCMjiuICUUr1Hu6pqd7ms,25279
17
- guidellm/data/__init__.py,sha256=sTZlJdpYcfFKkNk-CHtHm7_l8n9KwBhlM7qs247ELCY,120
18
- guidellm/data/prideandprejudice.txt.gz,sha256=dmze5vnnSZmTU5NP7E1zcH30bOOnpYu5Motlm57xpYk,241795
19
- guidellm/dataset/__init__.py,sha256=PZVo9HXMACrDj7mCxOOOa64PsO0q2nAX3JW6XtJDDSc,593
20
- guidellm/dataset/creator.py,sha256=572pUxo8LkyK2VOoyjQyr6QPJn2IUfILXt8xp6ym91U,6614
21
- guidellm/dataset/entrypoints.py,sha256=-mYCyhibHPLBXQ_FmZOY3Lg4tQhDNEOfT8U9rSQNDQI,1370
22
- guidellm/dataset/file.py,sha256=hkRndn4WCaIrmWhje-Z81--JnPZVBhs7876P0Mo00mE,3350
23
- guidellm/dataset/hf_datasets.py,sha256=oWHeC0Iup4E4QulWcZWiCcQ4jtjw9_sTINJ6EEBTCXo,2016
24
- guidellm/dataset/in_memory.py,sha256=_p8CCW9xTTWG9aqbIE4mf9s3BVAZutneIPn-rEXT7xo,4699
25
- guidellm/dataset/synthetic.py,sha256=lC1yWhDk846ySsEkWNO5Sd6ZIADp38YDfdTmrvOFFFw,8487
26
- guidellm/objects/__init__.py,sha256=_vyJzlqnb6VvwUq7nrtWvskPAoFs_rmopV1gEXXz5ek,384
27
- guidellm/objects/pydantic.py,sha256=oF5SkXlNZLNXpnoGoJb3QHNvqDwFRLSsiPIecf8E-_g,1850
28
- guidellm/objects/statistics.py,sha256=6ZmN7IZKCgRqggLfGR348_p7avZxe2_VCAdr9zcqV10,36950
29
- guidellm/request/__init__.py,sha256=HgX5AAncRAv1WDV4Jhw9sQlGgBkDQQ_Jbr-GpZIqmNU,347
30
- guidellm/request/loader.py,sha256=rmanvbWW9BulsjOHvHMlJ1UQPWHKVRo0rlDDp8h6OXk,9075
31
- guidellm/request/request.py,sha256=BCf0Ua0h1oOj0y6HCyUh71r5tfFeS0fDrpaoU-UnMj4,3576
32
- guidellm/scheduler/__init__.py,sha256=sZ6DyQfe8-ZLII-Jzy7cJXtDph7-bMMDGFkLyUL8SmY,1199
33
- guidellm/scheduler/result.py,sha256=4jXwYt-54pdHCejIllTfeyQFMg1jKEZXzZXqBZTEzAA,5142
34
- guidellm/scheduler/scheduler.py,sha256=xRrCkLtf_MeWB0iPYVBk1rhJUn-zb4vd2B7YkmnCsYk,14403
35
- guidellm/scheduler/strategy.py,sha256=QZ0igLc9eksW_N5EhIIwi6rG1oeHbogse4eNvwxDQGg,18629
36
- guidellm/scheduler/types.py,sha256=zHZ94-zEYo4LkU3qrfT3BRoZioicDMCQDiY8hYHnkfI,130
37
- guidellm/scheduler/worker.py,sha256=VU0EKyJ7zIYxnEm-jPCz8DyICv2PcaZJiWQ8bXiLyfY,17567
38
- guidellm/utils/__init__.py,sha256=Tg4HT5RiXSnQ48E-NuJJf0-fwyvqo5sgk7yFSc8WZ78,524
39
- guidellm/utils/colors.py,sha256=D0IGz8A346-Pt5qgnP3S5uV-VgngJoXbfToVCOna41k,175
40
- guidellm/utils/hf_transformers.py,sha256=3iF40l02VEWOcS8kasO8TSws0Lp3cE-NyiqoB9GnHuA,1021
41
- guidellm/utils/random.py,sha256=Ub7cI8J0ZfTkjO_x98KHvVKYs_jUlgmjRp67p-lhY5c,1314
42
- guidellm/utils/text.py,sha256=8ei6_Sj_rPRV6lW7yivV9UwgXPzRtNMxNkJ8m0e8RX0,6347
43
- guidellm-0.3.0rc20250507.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
- guidellm-0.3.0rc20250507.dist-info/METADATA,sha256=xP4wwhMb8gg5X4ZAOqSaF8i_9kM1NKiYKLGG9XTaV7I,30335
45
- guidellm-0.3.0rc20250507.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
46
- guidellm-0.3.0rc20250507.dist-info/entry_points.txt,sha256=DzLFEg47fF7qY1b-9laPz9jg0KSKJ1_D9TbF93kLz_E,51
47
- guidellm-0.3.0rc20250507.dist-info/top_level.txt,sha256=EXRGjnvFtL6MeZTe0tnHRMYcEWUW3vEqoG2zO7vFOtk,9
48
- guidellm-0.3.0rc20250507.dist-info/RECORD,,