verl Integration
Run the public verl-recipe Dynamo rollout backend
Experimental. verl-recipe provides an asynchronous Dynamo rollout backend with a shared frontend, vLLM workers, routing, and colocated policy updates. Use the upstream recipe as the implementation source of truth; this page covers the shortest Dynamo workflow and its support boundary.
The pinned snapshot and the install and launch commands below are a historical reference for ai-dynamo[vllm]==1.4.* with vLLM 0.26.0.
They are not a supported setup for Dynamo 1.7.0. See Prepare the Source for the known blockers and the reported run with local patches.
Integration Shape
The native router and ThunderAgent are different scheduling paths. Choose one before building the environment and do not compare their results as if only a router flag changed.
Prerequisites
- A Linux GPU environment that satisfies the selected verl, Dynamo, vLLM, CUDA, and PyTorch versions
git, Python,etcd, andnats-serverflash-attn, installed explicitly as its own step under Prepare the Source. The selected verl core reachesflash_attn.bert_paddingthroughverl/utils/attention_utils.pyon the CUDA path with no fallback, but declares the dependency in neitherrequirements.txtnorpyproject.toml, and the installer does not add it. Without it the training iteration stops atModuleNotFoundError: No module named 'flash_attn'- Model and dataset paths visible on every participating node
- Enough GPUs for the trainer and rollout layout; the validation smoke is not a full training run
Prepare the Source
ai-dynamo[vllm]==1.7.0 pins vLLM 0.33.0. Its upstream CUDA requirements pin PyTorch 2.14.0, and its common requirements require Transformers >=5.16.1,<5.21.0. These are package requirements, not a claim that every allowed version was tested with verl.
The reviewed recipe snapshot is 461b830c, and its REQUIRED_VERL.txt selects the matching core verl commit. The core commit records an older recipe submodule, so use the installer and then set the nested recipe checkout to the same reviewed snapshot:
The recipe does not pin a complete Dynamo/vLLM image for the native-router path. Build one clean environment, record its immutable image and package versions, and keep the Dynamo and nested recipe checkouts clean during validation.
The following blockers apply to the referenced snapshots:
- Model import: Build the historical environment on vLLM
0.26.0, which is whatai-dynamo[vllm]==1.4.*pins. The verl core selected by recipe461b830cimportsFusedMoEfromvllm.model_executor.layers.fused_moe.layerinverl/utils/vllm/vllm_fp8_utils.py. vLLM renamed it toFusedMoEFactoryin0.27.0, so the import fails on later versions, including0.33.0. On Dynamo 1.5.0 / vLLM0.28.0, loading this backend raisesImportError: FP8 quantization not availablebefore the Dynamo stack starts. - Tied embeddings: Starting with vLLM
0.29.0,load_weightschecks tied aliases within each call. The selected verl core loads each CUDA IPC bucket separately. Qwen2.5 fails its first policy update whenlm_head.weightandmodel.embed_tokens.weightarrive in separate buckets: the loader reports that the tied weight is uninitialized. Both tensors exceed the default 64 MiB bucket size, so each is sent alone. verl drops the redundant alias starting with verl-project/verl#7973, and in the FP8 path with verl-project/verl#8064. Recipe461b830cand recipe98de2b9b(which selects verl6cbca9ce) predate these fixes. Raising the bucket size is not a supported fix. - Pausing for policy updates: vLLM
0.32.0removedwait_for_inflight_requestsfromAsyncLLM.pause_generation, which now acceptsmodeandclear_cache. Recipe98de2b9band the verl core it selects (6cbca9ce) still pass the removed argument, causingTypeError: AsyncLLM.pause_generation() got an unexpected keyword argument 'wait_for_inflight_requests'. verl3255f6b1already usesmode="abort"on vLLM0.32.0or later; the recipe’s own caller still needs that change. - Worker discovery at startup: Recipe
98de2b9bcounts workers from/healthwithout requesting instance details. On Dynamo 1.7.0, it must use/health?instances=true; otherwise it sees no workers and waits until the startup timeout. See the health endpoint contract.
A Dynamo 1.7.0 setup needs a verl core with the pause and tied-alias fixes, plus a recipe with both its pause call and health query updated.
A locally patched Dynamo 1.7.0 RC5 run has been reported with Qwen3.5-35B-A3B on 16 B200 GPUs for eight training steps, using verl 6cbca9ce and recipe 242c73fc with patches to the health query, pause call, and Bridge. This is evidence for that patched setup; the unpatched commits are not supported pins, and the run does not establish the full recovery checks below.
Check this page and the release history for future validated Dynamo 1.7.x guidance. This page does not provide a supported 1.7.0 pair.
Install flash-attn
install_verl.sh does not install flash-attn, so add it to the same environment before running anything below:
Run this after PyTorch is installed. --no-build-isolation is what lets the build compile against the PyTorch already in the environment; upstream requires PyTorch 2.2 or newer and CUDA 12.0 or newer. Confirm ninja --version exits 0 first — a broken ninja leaves the build single-threaded and it can then take hours instead of minutes. Lower MAX_JOBS if the machine runs out of RAM during the build. See the FlashAttention project for platform notes and prebuilt wheels.
The selected verl also lists flash-attn in the gpu extra of its setup.py (GPU_REQUIRES), so pip install -e '.[gpu]' from the verl checkout is an equivalent route that additionally installs liger-kernel. Neither installer path the recipe uses requests that extra.
Run the Validation Smoke
Run the upstream validation-only smoke from the resulting verl checkout:
The three overrides are required because the selected verl leaves use_dynamic_bsz at false and defaults every micro-batch field to null, and neither the smoke script nor the recipe’s trainer configuration sets one, so the trainer rejects the run during config validation. The smoke script forwards any extra arguments to the trainer, so pass them on the command line instead of editing the upstream script. Use the _per_gpu form: upstream marks the global form deprecated.
The smoke starts recipe-managed etcd, NATS, a Dynamo vLLM worker, and the shared frontend. PASS: Dynamo validation smoke completed confirms the validation command completed; it does not prove an optimizer step or policy refresh.
Run a Training Iteration
After the smoke passes, run at least one optimizer step with the same environment. Use the pinned upstream Dynamo trainer configuration as the baseline, then make the model, data, resource, and routing overrides required for your environment. This example selects the native Dynamo router explicitly:
The three micro-batch overrides are required here for the same reason they are required in the smoke. actor_rollout_ref.rollout.tensor_model_parallel_size=2 states the selected verl’s own default rather than changing it: this example runs one rollout that is tensor-parallel across both requested GPUs. Set it to 1 for two independent rollout workers instead.
Adjust model, data, and resource values for your environment. A passing run must include rollout generation, reward or advantage computation, an actor update, policy synchronization, and generation after the update.
Verify the Run
Check three boundaries before scaling:
- Generation correctness: The completion token IDs and selected log probabilities consumed by verl match in length and order. Record terminal and canceled attempts separately.
- Policy update: Every intended rollout shard receives the same trainer step through the recipe’s CUDA IPC path, stale KV state is handled, and post-update generation succeeds.
- Routing: With ThunderAgent disabled, compare
round-robinandkvusing the same prompts, concurrency, cache state, and update cadence. Report useful framework output, not only request throughput.
Set request_completion_token_ids=true when the framework must score the exact engine tokens. Use RL Integration Reference for the shared response checks and KV-Aware Load Balancing for RL Rollouts for the routing experiment.
Observe and Recover
The training command above enables worker system metrics and starts the provided sidecar before workers come online. The sidecar rediscovers endpoint files throughout the run and writes per-worker snapshots to /tmp/verl-dynamo/kv-metrics.jsonl; starting it only after training leaves no live workers to scrape.
See Profile and Simulate RL Rollouts for request tracing and Distribute and Update Rollout Weights for the policy-update boundary.
Current Limitations
- The recipe does not provide one complete native-path Dynamo/vLLM image pin.
- The documented policy update is the recipe’s colocated CUDA IPC path, not public Dynamo worker discovery or ModelExpress.
- Policy updates for tied-embedding models on vLLM
0.29.0or later need the tied-alias fixes described under Prepare the Source. - No supported Dynamo 1.7.0 / vLLM
0.33.0pair is provided here; see Prepare the Source for the snapshot blockers and the reported run with local patches. - Multi-node and large-model layouts require separate topology and failure validation.
- Supported status requires an independent run with token correctness, policy refresh, post-update generation, and request, worker, and update recovery.