APIs#

Walk through RLinf’s most essential API interfaces and how to use them. These key APIs are exposed to users to simplify the complex data flows of RL, allowing them to focus on higher-level abstractions without needing to worry about the underlying implementations.

This API documentation proceeds bottom-up, starting with the foundational APIs of RLinf, including:

API

What you get

Worker

A unified interface for workers and worker groups.

Placement

An introduction to RLinf’s GPU placement strategies.

Cluster

Support for distributed training via clusters.

Channel

Low-level communication primitives, including a producer-consumer queue abstraction.

After that, we introduce the upper-layer APIs used to implement different stages of RL:

API

What you get

Actor

Actor wrappers based on FSDP and Megatron.

Rollout

Rollout wrappers built on Hugging Face and SGLang.

Env

Environment wrappers for embodied intelligence scenarios.

Data

Data structures transferred between different workers.

Embodied Data

Embodied Env/Rollout data structures.

Replay Buffer

Trajectory replay buffer design and sampling.