Configuration¶
Configuration comes from three places: a targets file for the client, per-host env files for vLLM and the sidecar, and a few environment variables. The client's run options are CLI flags.
targets.toml¶
Lists the vLLM servers the client benchmarks. Targets run one after another,
in file order, or all at once with --parallel-targets.
[[targets]]
name = "g4dn"
base_url = "http://<g4dn-private-ip>:8000"
sidecar_url = "http://<g4dn-private-ip>:8001"
model = "Qwen/Qwen3-ASR-1.7B" # optional
runner_host = "<g4dn-runner-ssh-host>" # optional
vllm_host = "<g4dn-ssh-host>" # optional
| Key | Required | Meaning |
|---|---|---|
name |
yes | target on every event written while the target runs, and the value --only matches. |
base_url |
yes | vLLM server root, as the host that runs the harness reaches it. |
sidecar_url |
no | Log sidecar root. Without it, the target has no journal, telemetry or upload baseline. |
model |
no | Model ID to request. Defaults to the first ID from /v1/models. |
runner_host |
no | The SSH host name, as your SSH config resolves it, of the runner host that --on-host runs this target's benchmark harness on. Without it, the harness runs on the vLLM host (Alternate run methods). |
vllm_host |
no | The vLLM host's SSH host name, which --on-host uses when there's no runner_host. Defaults to name. |
make push-hosts copies the code to the host each target runs its harness
on: its runner_host, else its vllm_host, else its name.
An --on-host run sends the whole targets file, without the SSH host names,
to the host that runs each target's harness, and --only there picks that
target, so the host needs no targets file of its own. Two copies are used,
and both are git-ignored:
| File | Used by | URLs |
|---|---|---|
targets.toml (repo root) |
On-host runs and bench host runs | Each vLLM host's private IP. Copy targets.example.toml and fill in terraform -chdir=terraform output private_ips. |
deploy/client/targets.toml |
Runs through SSM, and run-local.sh started by hand |
127.0.0.1 for every target. Needs a [[targets]] entry per host, named trn2, g4dn and g7e. |
run-local.sh mounts a targets file into the client container and passes
--only <target>: the entry an --on-host run sent, else the host's own
deploy/client/targets.toml. Deploy code via S3
sends that file from your workstation to every host, so it has to exist
there first.
[[targets]]
name = "trn2"
base_url = "http://127.0.0.1:8000"
sidecar_url = "http://127.0.0.1:8001"
[[targets]]
name = "g4dn"
base_url = "http://127.0.0.1:8000"
sidecar_url = "http://127.0.0.1:8001"
[[targets]]
name = "g7e"
base_url = "http://127.0.0.1:8000"
sidecar_url = "http://127.0.0.1:8001"
[[targets]]
name = "g6"
base_url = "http://127.0.0.1:8000"
sidecar_url = "http://127.0.0.1:8001"
vLLM env file¶
Installed as /etc/snap-asr-bench/vllm.env and read by vllm.service. The
sources are deploy/nvidia/g4dn.env, deploy/nvidia/g7e.env,
deploy/nvidia/g6.env and deploy/trn2/trn2.env.
Each can have a <name>.local.env next to it, for example
deploy/trn2/trn2.local.env, for settings that belong to one deployment
only. The install targets append it to the shipped file, and later values
win, as in systemd's EnvironmentFile. On trn2 it's required: the shipped
IMAGE is a placeholder for your own registry
(Trainium host).
| Key | Hosts | Meaning |
|---|---|---|
IMAGE |
all | Container image. start-vllm.sh never pulls, so it must already be present. A placeholder on trn2, set in trn2.local.env. |
MODEL |
all | Hugging Face model ID passed to vllm serve. |
VLLM_ARGS |
all | Extra vllm serve flags (dtype, memory, lengths, parallelism). |
API_SERVER_COUNT |
NVIDIA | vLLM API server processes in front of the engines, fixed at start-up. Unset: vLLM's default, one per data-parallel engine. A number sets it. auto: one per vCPU left after the engine cores (one per data-parallel engine) and the log sidecar, from 1 to 8; 6 on a g7e.2xlarge. Set to auto on g7e and g6. Don't also put --api-server-count in VLLM_ARGS. |
VLLM_LOGGING_LEVEL |
all | INFO. DEBUG writes thousands of journal lines a second. |
VLLM_HTTP_TIMEOUT_KEEP_ALIVE |
all | 60. Idle seconds before vLLM closes a connection (default 5), so a stream keeps one connection. |
VLLM_ADDITIONAL_CONFIG |
trn2 | JSON for --additional-config: Neuron buckets and encoder cache. See Trainium host. |
VLLM_ENGINE_READY_TIMEOUT_S |
trn2 | 3600. The first start compiles for longer than vLLM's default 600 s. |
OMP_NUM_THREADS |
trn2 | 1. Required on trn2.3xlarge, otherwise TTFT rises 5 to 10 times. |
NEURON_RT_XU_WORKER_ENABLE_LOW_LATENCY_COMPLETION |
trn2 | 0. |
NEURON_SKIP_EFA_AFFINITY |
trn2 | 1. trn2.3xlarge has no EFA. |
Current server settings:
| Setting | g4dn | g7e | g6 | trn2 |
|---|---|---|---|---|
| dtype | half (T4 has no BF16) |
bfloat16 |
bfloat16 |
bfloat16 |
--max-model-len |
4096 | 4096 | 4096 | 1024 |
| GPU memory use | 0.90 | 0.90 | 0.90 | n/a |
| Parallelism | 1 GPU | 1 GPU | DP4, one engine per L4 | TP1 × DP4, LNC=2 |
--max-num-seqs |
vLLM default | vLLM default | vLLM default | 48 |
| API servers | 1 (vLLM default) | 6 (auto) |
8 (auto) |
4 (vLLM default, one per engine) |
| Prefix caching | off | off | off | off (decision 17) |
| Request and output logging | off | off | off | on |
Sidecar env file¶
Installed as /etc/snap-asr-bench/sidecar.env. The sources are
deploy/nvidia/sidecar.env and deploy/trn2/sidecar.env.
| Key | Default | Meaning |
|---|---|---|
ASR_SIDECAR_UNIT |
vllm.service |
systemd unit whose journal is streamed |
ASR_SIDECAR_COMMANDS |
{} |
JSON object of name → argv. The client follows every command listed. NVIDIA hosts run nvidia-smi every 500 ms. trn2 runs neuron-monitor. |
ASR_SIDECAR_HOST |
0.0.0.0 |
Bind address |
ASR_SIDECAR_PORT |
8001 |
Port |
ASR_SIDECAR_VLLM_ENV |
/etc/snap-asr-bench/vllm.env |
vLLM env file reported in /health, with secret-looking values hidden |
Environment variables¶
| Variable | Read by | Meaning |
|---|---|---|
SNAP_ASR_BENCH_WORK_DIR |
Client | Default for --work-dir (/mnt/nvme/snap-asr-bench). |
SNAP_ASR_BENCH_CLIENT_IMAGE |
Client | Logged as host.client_image. Set by run-local.sh. |
AWS_PROFILE |
Workstation scripts, Terraform | Credentials for S3 sync, SSM and Terraform. aws_profile in terraform/terraform.tfvars overrides it for Terraform. |
BUCKET_REGION |
run-local.sh |
The bench bucket's region, for the client container's AWS_DEFAULT_REGION. Set by run-on-hosts.sh from Terraform. Default us-east-1. |
TARGETS |
run-on-hosts.sh |
Space-separated hosts to run on. Default trn2 g4dn g7e g6. |
AWS_* |
Client | Standard boto3 credential and region variables. On EC2 the instance role is used. |
make variables are listed in Make targets.
Files on each host¶
| Path | Contents |
|---|---|
~/snap-asr-bench/ |
Code synced from S3 |
/etc/snap-asr-bench/vllm.env, sidecar.env |
Installed env files |
/etc/systemd/journald.conf.d/snap-asr-bench.conf |
The journald cap on the inference hosts: 2 days and 2 GB of journal |
/opt/snap-asr-bench/start-vllm.sh, asr_log_sidecar.py |
Installed scripts |
/opt/snap-asr-bench/hf-cache/ |
Model weights |
/opt/snap-asr-bench/champion-cache/, neuron-compile-cache/ |
trn2 compile caches |
/mnt/nvme/snap-asr-bench/inputs/ |
Staged and cached inputs, manifests and S3 references |
/mnt/nvme/snap-asr-bench/runs/<run-id>/ |
events.jsonl, each input's extracted audio as audio/0000.s16le onwards, and warmup.s16le with a warm-up input |