SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.06122 · 2025

Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-24; 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/2506.06122.json · badge: /api/ran/2506.06122.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
alibaba/roll canonical (classifier label)
classifier basis not recorded on the link
4 ran · 4 no recorded run
FunctionStatusWhere it lives
add_default_system Ran
ran on a synthesized input
alibaba/roll/roll/datasets/chat_template.py
code served (permissive licence) · get_code("f4d39164139e6e3f")
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 list, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.vocab_size = 1000
        self.model_max_length = 512
    
    def __call__(self, text, **kwargs):
        return {"input_ids": torch.tensor([[1, 2, 3]]), "attention_mask": torch.tensor([[1, 1, 1]])}
    
    def encode(self, text, **kwargs):
        return [1, 2, 3]
    
    def decode(self, ids, **kwargs):
        return "decoded text"

def mock_func(tokenizer, conversation, **kwargs):
    """Mock function that accepts tokenizer and conversation"""
    return conversation

tokenizer = MockTokenizer()

conversation = [
    {'role': 'user', 'content': 'Hello'},
    {'role': 'assistant', 'content': 'Hi there'}
]

def simple_func(tokenizer, conversation, **kwargs):
    return conversation

ARGS = {
    'func': simple_func,
    'tokenizer': tokenizer,
    'conversation': conversation,
    'default_system': 'You are a helpful assistant.',
    'kwargs': {}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
collate_fn_to_dict_list Ran
ran on a synthesized input
alibaba/roll/roll/datasets/collator.py
code served (permissive licence) · get_code("da60efb6bb1f4376")
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 dict. 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)

# Construct a list of dicts with mixed tensor and non-tensor data
data_list = [
    {
        "embeddings": torch.randn(2, 4),
        "ids": torch.tensor([1, 2]),
        "text": "sample1",
        "label": 0
    },
    {
        "embeddings": torch.randn(2, 4),
        "ids": torch.tensor([3, 4]),
        "text": "sample2",
        "label": 1
    }
]

ARGS = {
    "data_list": data_list
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
filter_forward_args Ran
ran; our contract draft was wrong, not the code
alibaba/roll/roll/models/func_providers.py
code served (permissive licence) · get_code("a063873313ec0a07")
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 dict. 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 torch.nn as nn
import inspect

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, input_tensor, mask=None, labels=None):
        return self.linear(input_tensor)

model = SimpleModel()

forward_args = {
    "input_tensor": torch.randn(2, 4),
    "mask": torch.ones(2, 4),
    "labels": torch.randint(0, 3, (2,)),
    "extra_param": "this_should_be_filtered_out"
}

ARGS = {
    "model": model,
    "forward_args": forward_args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
register_chat_template Ran
ran on a synthesized input
alibaba/roll/roll/datasets/chat_template.py
code served (permissive licence) · get_code("fddd6512afb977f2")
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 function. 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 torch.nn as nn
from functools import partial
from unittest.mock import Mock

# Global dict for storing chat templates (needed for the decorator to work)
chat_templates = {}

# Define a minimal PreTrainedTokenizer stand-in
class MockTokenizer:
    def __init__(self):
        self.vocab_size = 1000
        self.model_max_length = 512
    
    def encode(self, text):
        return [1, 2, 3]
    
    def decode(self, ids):
        return "decoded text"

# Define the functions being decorated
def mock_chat_func(tokenizer, conversation, **kwargs):
    """A simple mock function that would be decorated"""
    return f"Processed {len(conversation)} messages"

# Create test data
tokenizer = MockTokenizer()

conversation = [
    {'role': 'user', 'content': 'Hello'},
    {'role': 'assistant', 'content': 'Hi there'}
]

default_system_msg = "You are a helpful assistant."

# Build ARGS dict with all parameters for register_chat_template
ARGS = {
    'key': 'test_template',
    'kwargs': {}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_chat_template Not yet run
unverified (harvested, no recorded run)
alibaba/roll/roll/datasets/chat_template.py
code served (permissive licence) · get_code("e7dc24c0a6b534e4")
How it ran

no invocation recorded.

is_valid_video Not yet run
unverified (harvested, no recorded run)
alibaba/roll/roll/datasets/collator.py
code served (permissive licence) · get_code("4b18569a0fddaf54")
How it ran

no invocation recorded.

is_valid_video_frame Not yet run
unverified (harvested, no recorded run)
alibaba/roll/roll/datasets/collator.py
code served (permissive licence) · get_code("7240bba01a4dce71")
How it ran

no invocation recorded.

no_set_device_hook_post_init Not yet run
unverified (harvested, no recorded run)
alibaba/roll/roll/models/trl_patches.py
code served (permissive licence) · get_code("414bb5321e52ac1b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
filter_forward_args 2 other papers
2 later
2601.10477 (2026-01)
Urban Socio-Semantic Segmentation with Vision-Language Reasoning
2604.02795 (2026-04)
Rubrics to Tokens: Bridging Response-level Rubrics and Token-level Rewards in Instruction Following Tasks
no_set_device_hook_post_init 2 other papers
2 later
2601.10477 (2026-01)
Urban Socio-Semantic Segmentation with Vision-Language Reasoning
2604.02795 (2026-04)
Rubrics to Tokens: Bridging Response-level Rubrics and Token-level Rewards in Instruction Following Tasks

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-24.

Repositories linked to this paper

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

Abstract

We introduce ROLL, an efficient, scalable, and user-friendly library designed for Reinforcement Learning Optimization for Large-scale Learning. ROLL caters to three primary user groups: tech pioneers aiming for cost-effective, fault-tolerant large-scale training, developers requiring flexible control over training workflows, and researchers seeking agile experimentation. ROLL is built upon several key modules to serve these user groups effectively. First, a single-controller architecture combined with an abstraction of the parallel worker simplifies the development of the training pipeline. Second, the parallel strategy and data transfer modules enable efficient and scalable training. Third, the rollout scheduler offers fine-grained management of each sample's lifecycle during the rollout stage. Fourth, the environment worker and reward worker support rapid and flexible experimentation with agentic RL algorithms and reward designs. Finally, AutoDeviceMapping allows users to assign resources to different models flexibly across various stages.

For agents

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

get_harvested_code_for_paper("2506.06122")
get_code_for_paper("2506.06122")
have("2506.06122")

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

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

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

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

Connect an agent — have() is free.