Download serving/launch_vllm.sh from RightNowAI/duplex-v0: direct link, hf CLI and curl.
- Browser
- Download file 3.29 kB
-
https://huggingface.co/RightNowAI/duplex-v0/resolve/main/serving/launch_vllm.sh
- Command line
-
hf download hf://RightNowAI/duplex-v0/serving/launch_vllm.sh
-
curl -L -o launch_vllm.sh https://huggingface.co/RightNowAI/duplex-v0/resolve/main/serving/launch_vllm.sh
3.29 kB
| # The released serving command (Docker method on the model card of stepfun-ai/Step-Audio-R1.1). | |
| # Changes, the first two required by the plan (Track A lives on GPU 0 alone): | |
| # --gpus device=0 (the card uses --gpus all) | |
| # --tensor-parallel-size 1 (the card uses 4) | |
| # -p 127.0.0.1:9999:9999 (the card publishes the port on every interface; this machine has a public address) | |
| # no -ti, a container name (runs in the background) | |
| # no "--" before "vllm serve" (this Docker hands "--" to the container as the program and fails) | |
| # --compilation-config '{"use_inductor": false}' | |
| # measured on this GPU, 2026-11-30: with the image's default (Inductor on) the engine dies at start with | |
| # "'sm_103a' is not a recognized processor" / "LLVM ERROR: Cannot select: intrinsic | |
| # %llvm.nvvm.shfl.sync.bfly.i32": the image's Triton 3.3.1 (torch 2.7.1+cu128) cannot generate | |
| # kernels for this GPU. Turning Inductor off keeps vLLM's CUDA graphs and skips that code generation. | |
| # -e VLLM_USE_FLASHINFER_SAMPLER=0 | |
| # measured next: the FlashInfer top-p/top-k sampler builds itself at start and the image's torch | |
| # refuses with "Unknown CUDA arch (10.3+PTX) or GPU not supported". vLLM's own switch falls back | |
| # to its PyTorch sampler. | |
| # -v <host folder>:/root/.nv | |
| # measured in the second run: after every start, the first reply longer than one token stalls for | |
| # about 90 s with the GPU idle (the engine waits in torch.cuda.Event.synchronize while the driver | |
| # builds kernels for this GPU; in the first run this was wrongly put down to CPU load). The driver | |
| # keeps the result in /root/.nv/ComputeCache; keeping that folder on the host is meant to spare | |
| # later starts the stall. Added after the measurements; not yet timed. | |
| # NOT set: TORCHDYNAMO_DISABLE=1. Measured in the second run: a request with "logprobs" kills the engine | |
| # with the same LLVM error (vLLM compiles a token-rank function on first use). Turning torch.compile | |
| # off for the container stops that crash but makes every reply hang after its first token. So this | |
| # image cannot return logprobs on this GPU, and nothing here asks for them. | |
| # The chat template is the card's own, byte for byte, read from a file instead of the command line. | |
| set -euo pipefail | |
| MODEL_DIR=${MODEL_DIR:?set MODEL_DIR to the downloaded Step-Audio-R1.1 folder} | |
| HERE=$(cd "$(dirname "$0")" && pwd) | |
| GPU=${GPU:-0} # extra copies (GPU=1 PORT=9991 ...) only run evaluation arms side by side | |
| PORT=${PORT:-9999} | |
| exec sudo docker run --rm --name "duplex-vllm-$GPU" --gpus "\"device=$GPU\"" \ | |
| -v "$MODEL_DIR":/Step-Audio-R1.1 \ | |
| -v "$HERE/chat_template.jinja":/chat_template.jinja:ro \ | |
| -p "127.0.0.1:$PORT:9999" \ | |
| -v "${NV_CACHE:-$HOME/.cache/duplex-nv}":/root/.nv \ | |
| -e VLLM_USE_FLASHINFER_SAMPLER=0 \ | |
| stepfun2025/vllm:step-audio-2-v20250909 \ | |
| vllm serve /Step-Audio-R1.1 \ | |
| --served-model-name Step-Audio-R1.1 \ | |
| --port 9999 \ | |
| --max-model-len 16384 \ | |
| --max-num-seqs 32 \ | |
| --tensor-parallel-size 1 \ | |
| --chat-template /chat_template.jinja \ | |
| --compilation-config '{"use_inductor": false}' \ | |
| --enable-log-requests \ | |
| --interleave-mm-strings \ | |
| --trust-remote-code | |