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
docs: Add and expand guides for CLI, config, and data formats
Created new guides for configuration options (environment variables,
.env files) and supported data formats. It also updates the main CLI
reference and links to the new guides.
Copy file name to clipboardExpand all lines: docs/guides/cli.md
+25-5Lines changed: 25 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,34 @@ This page provides a reference for the `guidellm` command-line interface. For mo
4
4
5
5
## `guidellm benchmark run`
6
6
7
-
This command is the primary entrypoint for running benchmarks.
7
+
This command is the primary entrypoint for running benchmarks. It has many options that can be specified on the command line or in a scenario file.
8
8
9
-
### Target Configuration
9
+
### Scenario Configuration
10
+
11
+
| Option | Description |
12
+
| --- | --- |
13
+
|`--scenario <PATH or NAME>`| The name of a builtin scenario or path to a scenario configuration file. Options specified on the command line will override the scenario file. |
14
+
15
+
### Target and Backend Configuration
10
16
11
17
These options configure how `guidellm` connects to the system under test.
12
18
13
19
| Option | Description |
14
20
| --- | --- |
15
-
|`--target <URL>`|**Required.** The endpoint of the target system, e.g., `http://localhost:8080`. |
16
-
|`--target-header <HEADER>`| A header to send with requests to the target. This option can be specified multiple times to send multiple headers. The header should be in the format `"Header-Name: Header-Value"`. For example: `--target-header "Authorization: Bearer my-secret-token"`|
17
-
|`--target-skip-ssl-verify`| A flag to disable SSL certificate verification when connecting to the target. This is useful for development environments with self-signed certificates, but should be used with caution in production. |
21
+
|`--target <URL>`|**Required.** The endpoint of the target system, e.g., `http://localhost:8080`. Can also be set with the `GUIDELLM__OPENAI__BASE_URL` environment variable. |
22
+
|`--target-header <HEADER>`| A header to send with requests to the target. Can be specified multiple times. Example: `--target-header "Authorization: Bearer my-secret-token"`. |
23
+
|`--target-skip-ssl-verify`| A flag to disable SSL certificate verification when connecting to the target. |
24
+
|`--backend-type <TYPE>`| The type of backend to use. Defaults to `openai_http`. |
25
+
|`--model <NAME>`| The ID of the model to benchmark within the backend. |
26
+
27
+
### Data and Request Configuration
28
+
29
+
These options define the data to be used for benchmarking and how requests will be generated.
30
+
31
+
| Option | Description |
32
+
| --- | --- |
33
+
|`--data <SOURCE>`| The data source. This can be a HuggingFace dataset ID, a path to a local data file, or a synthetic data configuration. See the [Data Formats Guide](./data_formats.md) for more details. |
34
+
|`--rate-type <TYPE>`| The type of request generation strategy to use (e.g., `constant`, `poisson`, `sweep`). |
35
+
|`--rate <NUMBER>`| The rate of requests per second for `constant` or `poisson` strategies, or the number of steps for a `sweep`. |
36
+
|`--max-requests <NUMBER>`| The maximum number of requests to run for each benchmark. |
37
+
|`--max-seconds <NUMBER>`| The maximum number of seconds to run each benchmark for. |
Copy file name to clipboardExpand all lines: docs/guides/configuration.md
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,24 +19,40 @@ For example, to set the `api_key` for the `openai` backend, you would use the fo
19
19
export GUIDELLM__OPENAI__API_KEY="your-api-key"
20
20
```
21
21
22
-
### Target Configuration
22
+
### Target and Backend Configuration
23
23
24
24
You can configure the connection to the target system using environment variables. This is an alternative to using the `--target-*` command-line flags.
25
25
26
26
| Environment Variable | Description | Example |
27
27
| --- | --- | --- |
28
-
|`GUIDELLM__OPENAI__HEADERS`| A JSON string representing a dictionary of headers to send to the target. These headers will override any default headers (like `Authorization` from `api_key`). |`export GUIDELLM__OPENAI__HEADERS='{"Authorization": "Bearer my-token", "X-Custom-Header": "value"}'`|
28
+
|`GUIDELLM__OPENAI__BASE_URL`| The endpoint of the target system. Equivalent to the `--target` CLI option. |`export GUIDELLM__OPENAI__BASE_URL="http://localhost:8080"`|
29
+
|`GUIDELLM__OPENAI__API_KEY`| The API key to use for bearer token authentication. |`export GUIDELLM__OPENAI__API_KEY="your-secret-api-key"`|
30
+
|`GUIDELLM__OPENAI__BEARER_TOKEN`| The full bearer token to use for authentication. |`export GUIDELLM__OPENAI__BEARER_TOKEN="Bearer your-secret-token"`|
31
+
|`GUIDELLM__OPENAI__HEADERS`| A JSON string representing a dictionary of headers to send to the target. These headers will override any default headers. |`export GUIDELLM__OPENAI__HEADERS='{"Authorization": "Bearer my-token"}'`|
29
32
|`GUIDELLM__OPENAI__ORGANIZATION`| The OpenAI organization to use for requests. |`export GUIDELLM__OPENAI__ORGANIZATION="org-12345"`|
30
33
|`GUIDELLM__OPENAI__PROJECT`| The OpenAI project to use for requests. |`export GUIDELLM__OPENAI__PROJECT="proj-67890"`|
31
34
|`GUIDELLM__OPENAI__VERIFY_SSL`| Set to `false` or `0` to disable SSL certificate verification. |`export GUIDELLM__OPENAI__VERIFY_SSL=false`|
35
+
|`GUIDELLM__OPENAI__MAX_OUTPUT_TOKENS`| The default maximum number of tokens to request for completions. |`export GUIDELLM__OPENAI__MAX_OUTPUT_TOKENS=2048`|
36
+
37
+
### General HTTP Settings
38
+
39
+
These settings control the behavior of the underlying HTTP client.
40
+
41
+
| Environment Variable | Description |
42
+
| --- | --- |
43
+
|`GUIDELLM__REQUEST_TIMEOUT`| The timeout in seconds for HTTP requests. Defaults to 300. |
44
+
|`GUIDELLM__REQUEST_HTTP2`| Set to `true` or `1` to enable HTTP/2 support. Defaults to true. |
45
+
|`GUIDELLM__REQUEST_FOLLOW_REDIRECTS`| Set to `true` or `1` to allow the client to follow redirects. Defaults to true. |
46
+
32
47
33
48
### Using a `.env` file
34
49
35
50
You can also place these variables in a `.env` file in your project's root directory:
The `--data` argument for the `guidellm benchmark run` command accepts several different formats for specifying the data to be used for benchmarking.
4
+
5
+
## Local Data Files
6
+
7
+
You can provide a path to a local data file in one of the following formats:
8
+
9
+
-**CSV (.csv)**: A comma-separated values file. The loader will attempt to find a column with a common name for the prompt (e.g., `prompt`, `text`, `instruction`).
10
+
-**JSON (.json)**: A JSON file. The structure should be a list of objects, where each object represents a row of data.
11
+
-**JSON Lines (.jsonl)**: A file where each line is a valid JSON object.
12
+
-**Text (.txt)**: A plain text file, where each line is treated as a separate prompt.
13
+
14
+
If the prompt column cannot be automatically determined, you can specify it using the `--data-args` option:
0 commit comments