whatisgithub

What is unirl?

tencent-hunyuan/unirl — explained in plain English

Analysis updated 2026-05-18

584PythonAudience · researcherLicense

In one sentence

Tencent's reinforcement learning framework for training image, video, and language AI models with a shared training loop.

Mindmap

mindmap
  root((UniRL))
    What it does
      Unified RL training loop
      Multimodal model support
      Distributed training runtime
    Tech stack
      Python
      PyTorch
      Ray
      vLLM and SGLang
    Team algorithms
      Flow-DPPO
      DRPO
    Training modes
      Diffusion models
      Autoregressive models
      Prompt enhancer
      Unified models
    Audience
      AI researchers
      ML infrastructure engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Train a text-to-image or text-to-video diffusion model using reinforcement learning.

USE CASE 2

Apply the team's Flow-DPPO or DRPO algorithms to improve a large language model.

USE CASE 3

Run a multi-node reinforcement learning training job across many GPUs using provided example configs.

USE CASE 4

Compare reference RL algorithms like GRPO against the framework's own proposed methods.

What is it built with?

PythonPyTorchRayvLLMSGLang

How does it compare?

tencent-hunyuan/unirllillian039/elfkhrisat/text-humanizer
Stars584590571
LanguagePythonPythonPython
Setup difficultyhard
Complexity5/5
Audienceresearcherresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

So what is it?

UniRL is a software framework from Tencent's Hunyuan team for training AI models using a method called reinforcement learning. Reinforcement learning is a way of improving a model by having it try things, scoring how well it did, and then adjusting it to do better next time. UniRL applies this same training loop across many different kinds of AI models so that one system can handle them all. The models it supports are described as multimodal, meaning they work with more than one type of content. The list includes models that turn text into images, models that turn text or images into video, models that read both text and images and respond with text, and plain text language models. It also covers unified models that combine two different generation techniques. The README presents model support and algorithm support as two separate dimensions that can be mixed, so the framework covers many more combinations than the ready-made examples show. The project is organized in layers. You choose an entry point for the kind of model you want to train, load an example configuration file that describes the model, the algorithm, the rewards, and other settings, and the framework then runs the training loop for you. The shared underlying machinery handles spreading the work across many graphics processors, a common need because these models are large. A highlight the authors emphasize is two training algorithms their own team designed, called Flow-DPPO and DRPO, each with an accompanying research paper and a step-by-step tutorial. The framework also includes several well-known reference algorithms for comparison. To get started, you install the dependencies, run a check on your configuration, and then launch one of the provided example experiments with a single command, either on one machine or across several. The README lists a roadmap for adding more models and algorithms, explains how to contribute, and credits other open source projects the framework builds on. It is released under the Apache 2.0 License. This is a research and engineering tool aimed at people who train large AI models, not an end-user application.

Copy-paste prompts

Prompt 1
Explain what reinforcement learning post-training means for a large multimodal model.
Prompt 2
Walk me through launching the sd3_trainside example recipe with UniRL.
Prompt 3
What is the difference between the Flow-DPPO and DRPO algorithms this framework proposes?
Prompt 4
Help me understand how UniRL separates model support from algorithm support in its architecture.

Frequently asked questions

What is unirl?

Tencent's reinforcement learning framework for training image, video, and language AI models with a shared training loop.

What language is unirl written in?

Mainly Python. The stack also includes Python, PyTorch, Ray.

Who is unirl for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.