← all repositories
redai-infra/Relax

Unbundling RL training and inference for omni-modal post-training

This engine decouples RL training and inference into independent GPU services, letting text, vision, and audio models post-train asynchronously at scale.

504 stars Python ML FrameworksAgents
Relax
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

Relax is a reinforcement learning post-training framework built by the Xiaohongshu AI Infra Team for multimodal large language models. It uses Ray Serve to turn every stage—rollout, actor training, reference modeling, and advantage estimation—into independent services that run on separate GPU clusters. Data streams between them via TransferQueue, so inference and training never block each other, and the system supports text, vision, and audio in one pipeline.

The interesting bit

The architecture is aggressively service-oriented: every role is a Ray Serve deployment with its own placement group, elastic scaling, and fault recovery. This means you can grow or shrink inference capacity mid-training via a REST API, or let reference and advantage calculations run in-process on the actor’s own GPUs in Hybrid mode to cut idle time. It treats a GPU cluster less like a monolithic supercomputer and more like a load-balanced microservice mesh.

Key highlights

  • End-to-end omni-modal RL for text, vision, and audio—including Qwen3-Omni post-training
  • Three execution modes: synchronous colocation, fully async multi-cluster, and a Hybrid mode that mixes streaming data with in-process forward passes
  • Built-in algorithms: GRPO, GSPO, SAPO, CISPO, and on-policy distillation, plus pluggable rewards and GenRM (LLM-as-judge)
  • Elastic rollout scaling via HTTP REST API across same-cluster or federated external clusters
  • Production ops: health-managed auto-recovery, metrics export, and real-time notifications

Verdict

Teams already running Megatron-LM and Ray clusters for multimodal model post-training should evaluate this immediately; solo researchers or anyone looking for a lightweight, single-GPU RLHF script will find it overwhelming.

Frequently asked

What is redai-infra/Relax?
This engine decouples RL training and inference into independent GPU services, letting text, vision, and audio models post-train asynchronously at scale.
Is Relax open source?
Yes — redai-infra/Relax is open source, released under the Apache-2.0 license.
What language is Relax written in?
redai-infra/Relax is primarily written in Python.
How popular is Relax?
redai-infra/Relax has 504 stars on GitHub.
Where can I find Relax?
redai-infra/Relax is on GitHub at https://github.com/redai-infra/Relax.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.