Skip to content

NVIDIA hosts (g4dn, g7e, g6)

All three hosts use the AL2023 PyTorch DLAMI with the open-source NVIDIA driver, which ships Docker and the NVIDIA Container Toolkit. vLLM runs from the upstream vllm/vllm-openai image, started by systemd as ec2-user.

Host GPU dtype Notes
g4dn.xlarge T4, 16 GB, Turing (sm_75) half No bfloat16 and no FlashAttention 2.
g7e.2xlarge RTX PRO 6000 Blackwell (sm_120) bfloat16 FLASH_ATTN backend, 76.8 GiB KV cache at 0.90 memory use.
g6.12xlarge 4 x L4, 24 GB each, Ada (sm_89) bfloat16 One engine per GPU (--data-parallel-size 4), since the model fits on one, and eight API servers (API_SERVER_COUNT=auto). Not yet run (Limitations).

The image (IMAGE=vllm/vllm-openai:v0.33.0 in the env file) is built for CUDA 13.0 with kernels for sm_75 to sm_120, so it covers all three GPUs. The DLAMI's driver (595, CUDA 13.2) supports it.

Quick install

Connect with SSM, run sudo -iu ec2-user, and with the code in ~/snap-asr-bench (Deploy code via S3):

cd ~/snap-asr-bench
sudo dnf install -y make              # if missing
make install-nvidia NVIDIA_HOST=g4dn  # or g7e, g6
journalctl -u vllm -f                 # wait until the server is ready

This does steps 2 and 3 below, then installs the log sidecar.

1. Check Docker

docker info --format '{{json .Runtimes}}'   # includes nvidia
nvidia-smi

2. Pull the image

sudo mkdir -p /opt/snap-asr-bench/hf-cache /etc/snap-asr-bench
sudo chown -R ec2-user: /opt/snap-asr-bench
docker pull vllm/vllm-openai:v0.33.0

The image is about 10 GB compressed. start-vllm.sh never pulls, so a restart can't fetch a different build.

3. Install the service

Use g4dn.env, g7e.env or g6.env. For settings that apply to your deployment only, such as IMAGE for a mirrored image, create <host>.local.env, such as g4dn.local.env, next to it instead of editing the shipped file. Its values win, and the cat below (like the make targets) appends it when it exists:

cd ~/snap-asr-bench
sudo install -m 0755 deploy/nvidia/start-vllm.sh /opt/snap-asr-bench/start-vllm.sh
cat deploy/nvidia/g4dn.env $(ls deploy/nvidia/g4dn.local.env 2>/dev/null) | sudo tee /etc/snap-asr-bench/vllm.env >/dev/null
sudo install -m 0644 deploy/systemd/vllm.service /etc/systemd/system/vllm.service
sudo install -D -m 0644 deploy/systemd/journald-snap-asr-bench.conf /etc/systemd/journald.conf.d/snap-asr-bench.conf
sudo systemctl restart systemd-journald
sudo systemctl daemon-reload
sudo systemctl enable --now vllm

The journald drop-in caps the journal at 2 days and 2 GB, so each run's replay of vLLM's journal (--journal-from service-start) stays short. Start-up lines older than that are dropped; the sidecar's /health records what the server runs instead.

start-vllm.sh logs the image ID and digest, then runs the container in the foreground with host networking. The server listens on port 8000, its output goes to the vllm.service journal (which the sidecar streams), and model weights are cached in /opt/snap-asr-bench/hf-cache. The env file keys are described in Configuration.

When the model loads

There's no separate step to load the model: starting vllm.service does it.

  1. start-vllm.sh reads MODEL from /etc/snap-asr-bench/vllm.env (Qwen/Qwen3-ASR-1.7B) and passes it to the container, which runs vllm serve <MODEL>.
  2. Hugging Face, every start: vLLM checks the Hugging Face Hub for the latest revision of the model. On the first start it also downloads the weights into /opt/snap-asr-bench/hf-cache (4.4 GB for 1.7B). The model is public, so no token is needed. The model isn't pinned to a revision, so a change upstream is picked up at the next restart. See Network dependencies.
  3. Every start: vLLM loads the weights from the cache onto the GPU, captures CUDA graphs and warms up.
  4. The server is ready when curl -s localhost:8000/v1/models lists the model (step 4). Until then the client's requests fail to connect.

To serve a different model, change MODEL and restart the unit. See Switch model.

No qwen-asr package

The image runs plain vllm serve, which the Qwen3-ASR README also documents. qwen-asr 0.0.6 fails to import with the transformers 5.x that vLLM 0.33 requires.

4. Check

curl -s localhost:8000/v1/models | jq -r '.data[].id'
curl -s localhost:8000/metrics | grep -c '^vllm:'