For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI Reference
DocumentationAPI Reference
  • Documentation
    • Home
  • About
    • Concepts
    • Ecosystem
  • Get Started
    • Quickstart
    • Detailed Setup Guide
    • Install from PyPI
    • Rollout Collection
  • Agent Server
  • Model Server
    • vLLM
  • Resources Server
  • Data
    • Prepare and Validate
    • Download from Hugging Face
    • Prompt Config
  • Environment Tutorials
    • Single-Step Environment
    • Multi-Step Environment
    • Stateful Environment
    • Real-World Environment
    • Integrate external libraries
    • Aggregate Metrics
    • LLM-as-Judge Verification
  • Benchmarks
    • Run benchmarks
    • Add a benchmark
    • Design a customer evaluation
  • Training Tutorials
    • NeMo RL
    • Unsloth
    • Multi-Environment Training
    • Offline Training (SFT/DPO)
  • Model Recipes
    • Nemotron 3 Nano
    • Nemotron 3 Super
  • Infrastructure
    • Deployment Topology
    • Engineering Notes
  • Reference
    • Configuration
    • RL Framework Compatibility
    • CLI Commands
    • FAQ
  • Troubleshooting
    • Configuration Errors
  • Contribute
    • Development Setup
    • Environments
    • Integrate RL Frameworks
      • Generation Backend
      • On-Policy Corrections
      • Integration Footprint
      • Success Criteria
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogoNeMo Gym
On this page
  • Prerequisites
  • Integration Components
  • Integration Workflow
Contribute

Integrate RL Frameworks

||View as Markdown|
Previous

New Environment

Next

Generation Backend

These guides cover how to integrate NeMo Gym into a new RL training framework. Use them if you are:

  • A training framework maintainer adding NeMo Gym support
  • Contributing NeMo Gym integration for a training framework that does not have one yet

Just want to train models? See Training Tutorials for supported frameworks.

Prerequisites

Before integrating Gym into your training framework, ensure you have:

  • An RL training framework with policy optimization support (PPO, GRPO, or similar)
  • A generation backend (vLLM, SGLang, or equivalent)
  • Familiarity with OpenAI-compatible HTTP server APIs

Integration Components

Gym integration requires implementing the following components in your training framework:

Generation Backend

OpenAI-compatible HTTP server requirements and existing implementations across RL frameworks.

prerequisite
On-Policy Corrections

Fixes for on-policy training in multi-step and multi-turn scenarios to prevent train-generation mismatch.

prerequisite
Integration Footprint

Implementation components, form factor, and reference implementations from NeMo RL.

implementation
Success Criteria

Validation criteria and benchmarks to verify correct Gym integration.

validation

Integration Workflow

The typical integration workflow follows this sequence:

StepComponentDescription
1Generation backendExpose your generation engine, such as vLLM or SGLang, as an OpenAI-compatible HTTP server
2On-policy correctionsImplement token ID fixes to prevent re-tokenization and re-templating issues
3Gym integrationConnect Gym to your training loop using the rollout orchestration APIs
4ValidationVerify integration using the success criteria benchmarks