vllm-project/vime
An LLM post-training framework with vLLM for RL Scaling
Vime – LLM post‑training framework for reinforcement‑learning at scale
What it is
- Vime is a research‑grade framework that lets you fine‑tune large language models (LLMs) with reinforcement‑learning (RL) methods. It stitches together two proven stacks:
- Megatron‑LM – the high‑throughput training engine used for giant models.
- vLLM (plus the optional vllm‑router) – a fast inference server that can generate text on many GPUs in parallel.
- The combination gives a single data‑flow loop where prompts are generated, the model rolls out responses, rewards are computed, and the resulting trajectories are fed back into Megatron for the next training step.
Key capabilities
| Capability | How Vime delivers it |
|---|---|
| High‑performance training | Megatron handles the heavy‑weight gradient updates while Vime passes the same model weights to vLLM for rollout, keeping both sides in sync. |
| Flexible data generation | Users plug in custom generation functions (multi‑turn dialogs, tool calls, sandboxed environments, etc.). The Data Buffer abstracts prompts, generated samples, and RL rewards, so any workflow can be expressed. |
| Agentic / long‑horizon support | Built‑in hooks for multi‑agent, asynchronous, and code‑generation agents; examples include a coding‑agent RL run on Qwen‑3.8‑27B. |
Supported models (inherited from the upstream slime project) – Qwen series, DeepSeek V3 series, LLaMA 3, and other Megatron‑compatible checkpoints.
Architecture at a glance
- Training (Megatron) – reads batches from the Data Buffer, computes RL losses, and synchronises updated weights to the rollout side.
- Rollout (vLLM + router) – launches one or more vLLM inference engines, routes generation requests, and can wrap them with custom logic (tool use, environment interaction, reward verification).
- Data Buffer – the glue that stores prompts, generated trajectories, and rewards; it can be persisted via Ray’s object store or a “straw” shared‑storage backend for fault‑tolerance.
How to get started
- Follow the Quick‑Start guide (environment setup, data prep, launch script). All commands are driven by a single
train.pyentry point. - Choose a rollout backend (
--rollout-num-gpus-per-engine,--vllm‑router‑ip, etc.) and any Megatron parallelism flags you need. - Optionally add a custom generate function (
--custom-generate-function-path) to implement your own agentic loop. - Run the provided examples – multi‑agent, fully‑async, or the Qwen‑3.8 coding‑agent RL demo.
Extensibility
- Arguments are split into three groups (Megatron, vLLM, Vime‑specific) and are all exposed on the command line; the source files
vime/utils/arguments.pyandvime/backends/vllm_utils/arguments.pylist the full set. - Engine deployment supports heterogeneous GPU groups, external rollout servers, and delta‑weight sync for disk‑based updates, making it possible to run rollouts on a different cluster than the trainer.
- Testing & reliability – CPU unit tests, GPU end‑to‑end suites, and CI pipelines guard against silent RL bugs; fault‑tolerance docs describe how to recover from crashes using the straw transport.
Who should use Vime?
- Researchers building RL‑based LLM agents (tool‑using bots, code‑generation assistants, multi‑agent simulations).
- Teams that already use Megatron or vLLM and want a turnkey RL loop without rewriting the training or inference stack.
- Anyone needing a production‑ready, configurable pipeline that can scale across many GPUs while keeping the data‑generation logic flexible.
Where to find more
- Full docs: https://docs.vllm.ai/projects/vime/en/latest/
- Source code: https://github.com/vllm-project/vime
- Community: Slack channel and WeChat group (links in README).
Vime is a genuine open‑source project focused on LLM post‑training with reinforcement learning, tightly integrated with the vLLM ecosystem.
Related
- Dispatch
- Project
- Project
- Dispatch
- Project