Skip to content

Rollout Artifacts

During RL rollouts and on-policy distillation, the trainer often needs auxiliary per-token outputs from the inference pass—beyond just generated token IDs—to eliminate train–inference mismatch or compute distillation targets.

Quick Routing Guide

Artifact Document Use Case Key Flag / Parameter
Routed Experts (R3) Routed Experts Return MoE routing replay: reuse rollout router expert IDs during the training forward pass --enable-return-routed-experts
Sampling Mask Sampling Mask Distribution replay: return the exact token IDs that survived top-k / top-p / min-p filtering --return-sampling-mask, --logprobs-mode processed_logprobs
Prompt Token ID Logprobs Prompt Token ID Logprobs On-policy distillation (teacher scoring): compute teacher logprobs for exact student top-K candidate tokens prompt_logprob_token_ids
Hidden States Hidden State Extraction Export hidden states via connector for training speculative-decoding draft models (e.g., EAGLE) kv_transfer_params / hidden states connector

Auxiliary Output Connector (aux_output_connector)

For large per-token artifacts such as MoE routed experts, vLLM uses the aux output connector (vllm/distributed/aux_output_connector/) to store artifact rows per engine in host memory, keyed by KV block hash, on the engine's first tensor-parallel worker. See Routed Experts Return — Row storage for storage layout, replica affinity, cache invalidation on weight updates, and max_bytes sizing.