SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.19256 · 2024

HybridFlow: A Flexible and Efficient RLHF Framework

arXiv · PDF · Open in the Atlas

Code that ran

10 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 9 failures of our instrument; 6 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2409.19256.json · badge: /api/ran/2409.19256.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
du-nlp-lab/lengthreward community (classifier label)
classifier basis not recorded on the link
10 ran · 6 no recorded run
FunctionStatusWhere it lives
compute_ce_dpo_loss_rm Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/recipe/prime/prime_core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("f220595adfc5e83c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_detach_dpo_loss_rm Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/recipe/prime/prime_core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("4d91e4383716e42c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_online_dpo_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
du-nlp-lab/lengthreward/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("f19825983a523003")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_onlinedpo_pref Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("41b6e81dc3ecba79")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_prompt_response Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/recipe/char_count/create_dataset.py
code served (permissive licence) · get_code("e685ec4d0fa29f37")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

# Set random seed for reproducibility
random.seed(0)

# The function create_prompt_response takes two optional parameters:
# - min_length: int (default=3)
# - max_length: int (default=5)

ARGS = {
    'min_length': 3,
    'max_length': 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_kl_controller Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/recipe/spin/core_algos.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/OPDVR, is pointer only (licence: NONE) · get_code("757d109d90121142")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/OPDVR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_ipv4 Ran
ran, violated the contract we drafted
du-nlp-lab/lengthreward/verl/utils/net_utils.py
code served (permissive licence) · get_code("735e93af30b15fa9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ipaddress

ARGS = {
    "ip_str": "192.168.1.1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
reward_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
du-nlp-lab/lengthreward/recipe/r1/reward_score.py
code served (permissive licence) · get_code("c30b2a96103abd2c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned MagicMock. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Mock the recipe.r1.tasks modules to avoid import errors
import sys
from unittest.mock import MagicMock

mock_math = MagicMock()
mock_math.compute_score = lambda sol, gt: 0.85

mock_gpqa = MagicMock()
mock_gpqa.compute_score = lambda sol, gt: 0.92

mock_livecodebench = MagicMock()
mock_livecodebench.compute_score = lambda sol, gt: 0.78

sys.modules['recipe'] = MagicMock()
sys.modules['recipe.r1'] = MagicMock()
sys.modules['recipe.r1.tasks'] = MagicMock()
sys.modules['recipe.r1.tasks.math'] = mock_math
sys.modules['recipe.r1.tasks.gpqa'] = mock_gpqa
sys.modules['recipe.r1.tasks.livecodebench'] = mock_livecodebench

# Define arguments for reward_func
ARGS = {
    'data_source': 'Maxwell-Jia/AIME_2024',
    'solution_str': 'The answer is 42.',
    'ground_truth': '42',
    'extra_info': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, recipe, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MagicMock — a MagicMock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MagicMock output the recorded ndim 1 and dtype family None describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
union_tensor_dict Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/verl/protocol.py
code served (permissive licence) · get_code("21331a58f93375e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned TensorDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from tensordict import TensorDict

torch.manual_seed(0)

# Create two TensorDicts with identical batch size
batch_size = torch.Size([2])

# First tensor dict with some keys
tensor_dict1 = TensorDict(
    {
        "shared_key": torch.randn(2, 4),
        "key1": torch.randn(2, 3),
    },
    batch_size=batch_size,
)

# Second tensor dict with overlapping and new keys
tensor_dict2 = TensorDict(
    {
        "shared_key": tensor_dict1["shared_key"].clone(),  # Same tensor values
        "key2": torch.randn(2, 5),
    },
    batch_size=batch_size,
)

ARGS = {
    "tensor_dict1": tensor_dict1,
    "tensor_dict2": tensor_dict2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensordict, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TensorDict — a TensorDict output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unpad_dataproto Ran
ran; our contract draft was wrong, not the code
du-nlp-lab/lengthreward/verl/protocol.py
code served (permissive licence) · get_code("83b1686d7ac03c21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataProto. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# DataProto is a custom class that needs to support slicing with [:-pad_size]
class DataProto:
    def __init__(self, data):
        self.data = data
    
    def __getitem__(self, key):
        # Support slicing like [:-pad_size]
        sliced_data = self.data[key]
        return DataProto(sliced_data)
    
    def __repr__(self):
        return f"DataProto({self.data})"

# Create sample data
sample_data = torch.randn(2, 4)
data_proto = DataProto(sample_data)

ARGS = {
    'data': data_proto,
    'pad_size': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataProto — a DataProto output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataProto output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_generation_config Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/utils/model.py
code served (permissive licence) · get_code("c9d58036da0286f2")
How it ran

no invocation recorded.

get_huggingface_actor_config Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/utils/model.py
code served (permissive licence) · get_code("59904a8955b34252")
How it ran

no invocation recorded.

get_weight_loader Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/models/weight_loader_registry.py
code served (permissive licence) · get_code("acf240079d434746")
How it ran

no invocation recorded.

get_weight_saver Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/models/weight_loader_registry.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Hesse73/ARMOR, is pointer only (licence: NONE) · get_code("cd6b1e0d6afb2762")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Hesse73/ARMOR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

is_ipv6 Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/utils/net_utils.py
code served (permissive licence) · get_code("705afe175ad8e404")
How it ran

no invocation recorded.

squeeze Not yet run
unverified (harvested, no recorded run)
du-nlp-lab/lengthreward/verl/utils/model.py
code served (permissive licence) · get_code("3b15e2ac7497c441")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 16 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 16 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
unpad_dataproto 89 other papers
86 later, 3 undated
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
2502.14382 (2025-02)
S*: Test Time Scaling for Code Generation
and 86 more not named here
squeeze 82 other papers
79 later, 3 undated
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
2502.14768 (2025-02)
Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning
and 79 more not named here
union_tensor_dict 64 other papers
61 later, 3 undated · 4 only as an assembly brick
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
2502.14768 (2025-02)
Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning
and 61 more not named here
get_generation_config 63 other papers
61 later, 2 undated
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2502.19613 (2025-02)
Self-rewarding correction for mathematical reasoning
2503.06580 (2025-03)
Agent models: Internalizing Chain-of-Action Generation into Reasoning models
and 60 more not named here
get_weight_loader 58 other papers
56 later, 2 undated
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
2505.20046 (2025-05)
REARANK: Reasoning Re-ranking Agent via Reinforcement Learning
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
and 55 more not named here
get_huggingface_actor_config 53 other papers
51 later, 2 undated
2410.21236 (2024-10)
Flaming-hot Initiation with Regular Execution Sampling for Large Language Models
2025.findings-emnlp.1015 (2025 (year only))
MT-R1-Zero: Advancing LLM-based Machine Translation via R1-Zero-like Reinforcement Learning
2502.14768 (2025-02)
Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning
and 50 more not named here
compute_ce_dpo_loss_rm 46 other papers
43 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
and 43 more not named here
compute_detach_dpo_loss_rm 44 other papers
41 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
and 41 more not named here
is_ipv4 41 other papers
39 later, 2 undated
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
2510.04678 (2025-10)
Multi-Agent Tool-Integrated Policy Optimization
and 38 more not named here
is_ipv6 41 other papers
39 later, 2 undated
2506.08672 (2025-06)
RuleReasoner: Reinforced Rule-based Reasoning via Domain-aware Dynamic Sampling
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
2510.04678 (2025-10)
Multi-Agent Tool-Integrated Policy Optimization
and 38 more not named here
compute_online_dpo_loss 38 other papers
35 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 35 more not named here
get_kl_controller 38 other papers
35 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2506.12935 (2025-06)
SoundMind: RL-Incentivized Logic Reasoning for Audio-Language Models
and 35 more not named here
compute_onlinedpo_pref 30 other papers
27 later, 3 undated
2410.02992 (2024-10)
Learning to Better Search with Language Models via Guided Reinforced Self-Training
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2512.11391 (2025-12)
Mitigating the Safety Alignment Tax with Null-Space Constrained Policy Optimization
and 27 more not named here
reward_func 28 other papers
26 later, 2 undated
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2505.14362 (2025-05)
DeepEyes: Incentivizing "Thinking with Images" via Reinforcement Learning
2505.20046 (2025-05)
REARANK: Reasoning Re-ranking Agent via Reinforcement Learning
and 25 more not named here
get_weight_saver 12 other papers
12 later
2510.04678 (2025-10)
Multi-Agent Tool-Integrated Policy Optimization
2602.12036 (2026-02)
Composition-RL: Compose Your Verifiable Prompts for Reinforcement Learning of Large Language Models
2603.12109 (2026-03)
On Information Self-Locking in Reinforcement Learning for Active Reasoning of LLM agents
and 9 more not named here
create_prompt_response 1 other paper
1 later
2510.04678 (2025-10)
Multi-Agent Tool-Integrated Policy Optimization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Reinforcement Learning from Human Feedback (RLHF) is widely used in Large Language Model (LLM) alignment. Traditional RL can be modeled as a dataflow, where each node represents computation of a neural network (NN) and each edge denotes data dependencies between the NNs. RLHF complicates the dataflow by expanding each node into a distributed LLM training or generation program, and each edge into a many-to-many multicast. Traditional RL frameworks execute the dataflow using a single controller to instruct both intra-node computation and inter-node communication, which can be inefficient in RLHF due to large control dispatch overhead for distributed intra-node computation. Existing RLHF systems adopt a multi-controller paradigm, which can be inflexible due to nesting distributed computation and data communication. We propose HybridFlow, which combines single-controller and multi-controller paradigms in a hybrid manner to enable flexible representation and efficient execution of the RLHF dataflow. We carefully design a set of hierarchical APIs that decouple and encapsulate computation and data dependencies in the complex RLHF dataflow, allowing efficient operation orchestration to implement RLHF algorithms and flexible mapping of the computation onto various devices. We further design a 3D-HybridEngine for efficient actor model resharding between training and generation phases, with zero memory redundancy and significantly reduced communication overhead. Our experimental results demonstrate 1.53$\times$~20.57$\times$ throughput improvement when running various RLHF algorithms using HybridFlow, as compared with state-of-the-art baselines. HybridFlow source code will be available at https://github.com/volcengine/verl.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2409.19256")
get_code_for_paper("2409.19256")
have("2409.19256")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2409.19256.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2409.19256.svg)](https://syntology.ai/paper/2409.19256)

Connect an agent — have() is free.