SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.07966 · NeurIPS · 2025

Scaling RL to Long Videos

Jan Kautz, U Berkeley, Zhijian Liu, Song Han, Ligeng Zhu, Baifeng Shi, Xiaojuan Qi, Sifei Liu, Wei Huang, Yao Lu, Hongxu Yin, Pavlo Molchanov, and 3 more

arXiv · PDF · Open in the Atlas

Code that ran

18 of 24 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 16 failures of our instrument; 6 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-23; 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/2507.07966.json · badge: /api/ran/2507.07966.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
NVlabs/Long-RL canonical (classifier label)
classifier basis: census
12 ran · 4 no recorded run
nvlabs/long-rl canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
hiyouga/easyr1 marked official in Papers with Code
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
check_dot_in_model_path Ran
ran, violated the contract we drafted
nvlabs/long-rl/verl/utils/vila_remote_code/modeling_vila.py
code served (permissive licence) · get_code("8dd6b65f72c07727")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:55:11Z). 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 os.path as osp
import tempfile
import os

# Create a temporary directory to test with
temp_dir = tempfile.mkdtemp()

# Create a subdirectory with a dot in the path
dot_dir = osp.join(temp_dir, "model.v1")
os.makedirs(dot_dir, exist_ok=True)

# Test case 1: directory path with dot
model_path_with_dot_dir = dot_dir

ARGS = {
    "model_path": model_path_with_dot_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
SeqAllToAll Ran
ran on a synthesized input · constructed an object; no result was computed
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("9ab20c0df51491c6")
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 an instance of its own class, SeqAllToAll: the run constructed the object and did not call it, so no result was computed. 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.distributed as dist
from unittest.mock import MagicMock

torch.manual_seed(0)

# Mock distributed process group since we're CPU-only and don't have a real distributed setup
mock_group = MagicMock(spec=dist.ProcessGroup)

# Create a small input tensor: batch=2, seq_len=4, hidden=3
local_input = torch.randn(2, 4, 3)

# Scatter and gather dimensions
scatter_dim = 1
gather_dim = 1

# Async operation flag
async_op = False

ARGS = {
    "group": mock_group,
    "local_input": local_input,
    "scatter_dim": scatter_dim,
    "gather_dim": gather_dim,
    "async_op": async_op,
}
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 SeqAllToAll — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SeqAllToAll 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
_unpad_tensor Ran
ran; our contract draft was wrong, not the code
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("bc1859396d0efde4")
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 Tensor, ndim 3, dtype family float, shape (2, 4, 4) 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 torch

torch.manual_seed(0)

# Create a small tensor with padding that we want to remove
# Shape: (2, 4, 5) - batch_size=2, feature_dim=4, padded_length=5
x = torch.randn(2, 4, 5)

# Dimension along which to unpad
dim = 2

# Amount of padding to remove from the end
padding_size = 1

ARGS = {
    "x": x,
    "dim": dim,
    "padding_size": padding_size,
}
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 Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) 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
collect_video_files Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/longvideo-reason/step3_merge_captions.py
code served (permissive licence) · get_code("defc3c221f010765")
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 os
import tempfile
import shutil

# Create a temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()

# Create test JSON files with specific naming patterns
test_files = [
    'video1_0.json',
    'video1_1.json',
    'video1_2.json',
    'video2_0.json',
    'video2_1.json',
    'video3_0.json',
]

for file_name in test_files:
    file_path = os.path.join(temp_dir, file_name)
    with open(file_path, 'w') as f:
        f.write('{}')

# Also add a non-JSON file to test filtering
with open(os.path.join(temp_dir, 'readme.txt'), 'w') as f:
    f.write('not a json')

ARGS = {
    'folder': temp_dir
}
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 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
compute_gae_advantage_return Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/trainer/core_algos.py
code served (permissive licence) · get_code("b0bfe8a6b7ced02a")
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 3, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Mock the VF module that's referenced in the function
class VF:
    @staticmethod
    def masked_whiten(tensor, mask):
        """Simple masked whitening: normalize by mean/std, masking out zeros"""
        # Replace masked positions with 0 after whitening
        mean = tensor.sum() / mask.sum().clamp(min=1e-8)
        centered = tensor - mean
        std = (centered.pow(2).sum() / mask.sum().clamp(min=1e-8)).sqrt().clamp(min=1e-8)
        whitened = centered / std
        return whitened * mask

# Monkey-patch VF into the module scope
import sys
current_module = sys.modules[__name__]
current_module.VF = VF

# Create small tensors
batch_size = 2
response_length = 4

# token_level_rewards: (bs, response_length)
token_level_rewards = torch.randn(batch_size, response_length)

# values: (bs, response_length)
values = torch.randn(batch_size, response_length)

# response_mask: (bs, response_length) - binary mask
response_mask = torch.ones(batch_size, response_length)
response_mask[0, 3] = 0  # Mask out last token for first sample
response_mask[1, 2:] = 0  # Mask out last 2 tokens for second sample

# gamma: scalar tensor (discount factor)
gamma = torch.tensor(0.99)

# lam: scalar tensor (lambda for GAE)
lam = torch.tensor(0.95)

ARGS = {
    "token_level_rewards": token_level_rewards,
    "values": values,
    "response_mask": response_mask,
    "gamma": gamma,
    "lam": lam,
}
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 tuple, ndim 3, 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
compute_grpo_outcome_advantage Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/trainer/core_algos.py
code served (permissive licence) · get_code("758c7f607efffb52")
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 3, 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

torch.manual_seed(0)

# The function expects:
# - token_level_rewards: shape (bs, response_length) - tensor of rewards per token
# - response_mask: shape (bs, response_length) - binary mask for valid tokens
# - index: shape (bs,) - group/response identifiers (must have duplicates for GRPO)
# - eps: float - epsilon for numerical stability

# Create small tensors
batch_size = 2
response_length = 3

# token_level_rewards: (bs, response_length)
# Small random rewards for each token in each response
token_level_rewards = torch.randn(batch_size, response_length)

# response_mask: (bs, response_length)
# Binary mask indicating which tokens are valid (all valid in this case)
response_mask = torch.ones(batch_size, response_length)

# index: (bs,)
# Must have at least 2 samples per group for the assertion to pass
# Using [0, 0] means both samples belong to group 0
index = torch.tensor([0, 0], dtype=torch.long)

# eps: float
eps = 1e-6

ARGS = {
    "token_level_rewards": token_level_rewards,
    "response_mask": response_mask,
    "index": index,
    "eps": eps,
}
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 tuple, ndim 3, 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
gather_seq_scatter_heads Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("c370c3e6e37ff52d")
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 Tensor, ndim 4, dtype family float, shape (2, 8, 4, 3) 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 torch
import torch.distributed as dist
from unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Mock distributed process group and operations
mock_group = MagicMock(spec=dist.ProcessGroup)

# Mock the all_to_all function to work without actual distributed setup
def mock_all_to_all(output_list, input_list, group=None, async_op=False):
    # Simulate all_to_all by copying input to output
    for i, inp in enumerate(input_list):
        output_list[i].copy_(inp)
    
    mock_comm = MagicMock()
    mock_comm.wait = MagicMock(return_value=None)
    
    if async_op:
        return mock_comm
    return None

# Patch dist functions before importing the module functions
with patch('torch.distributed.get_world_size', return_value=2):
    with patch('torch.distributed.all_to_all', side_effect=mock_all_to_all):
        # Import would happen here in real scenario
        pass

# Create a small test tensor
# Shape: [batch_size=2, seq_len=8, head_dim=4, hidden=3]
x = torch.randn(2, 8, 4, 3)

# Define parameters for gather_seq_scatter_heads
seq_dim = 1        # sequence dimension
head_dim = 2       # head dimension to scatter
unpadded_dim_size = 0  # no unpadding
group = None       # will use default group (which is mocked as None in standalone case)

ARGS = {
    'x': x,
    'seq_dim': seq_dim,
    'head_dim': head_dim,
    'unpadded_dim_size': unpadded_dim_size,
    'group': group,
}
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 Tensor, ndim 4, dtype family float, shape (2, 8, 4, 3) — shape (2, 8, 4, 3) 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
generate_captions Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/longvideo-reason/step4_gen_reasoning_data.py
code served (permissive licence) · get_code("6e021f58ff92252d")
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 str. 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

# Construct a valid caption_dict argument
caption_dict = [
    {
        'caption': 'this is a test caption',
        'start_time': '00:00:05',
        'end_time': '00:00:10'
    },
    {
        'caption': 'another caption here',
        'start_time': '00:00:15',
        'end_time': '00:00:20'
    },
    {
        'caption': '',
        'start_time': '00:00:25',
        'end_time': '00:00:30'
    }
]

ARGS = {
    'caption_dict': caption_dict
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_chunked_index Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py
code served (permissive licence) · get_code("452188d5e8665c1e")
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 2, dtype family int; 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

torch.manual_seed(0)

# The function takes:
# - token_indices: a torch.Tensor of token indices
# - tokens_per_chunk: an int specifying tokens per chunk
# - remove_index: an int to subtract from token indices for comparison

# Create a small tensor of token indices
# The function compares token_indices[i] - remove_index against chunk boundaries
token_indices = torch.tensor([5, 10, 15, 20, 25, 30], dtype=torch.long)

tokens_per_chunk = 5
remove_index = 2

ARGS = {
    "token_indices": token_indices,
    "tokens_per_chunk": tokens_per_chunk,
    "remove_index": remove_index,
}
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 2, dtype family int — 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
get_kl_controller Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/trainer/core_algos.py
code served (permissive licence) · get_code("7633fd09bcf8972a")
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 AdaptiveKLController. 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 numpy as np

class AlgorithmConfig:
    def __init__(self, kl_type, kl_coef, kl_target=None, kl_horizon=None):
        self.kl_type = kl_type
        self.kl_coef = kl_coef
        self.kl_target = kl_target
        self.kl_horizon = kl_horizon

ARGS = {
    'algorithm_config': AlgorithmConfig(
        kl_type='adaptive',
        kl_coef=0.1,
        kl_target=0.01,
        kl_horizon=10000.0
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AdaptiveKLController — a AdaptiveKLController output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdaptiveKLController 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_llm_pos_ids_for_vision Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py
code served (permissive licence) · get_code("2b24afde621bf5ff")
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 Tensor, ndim 2, dtype family int, shape (3, 48) 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 torch

torch.manual_seed(0)

ARGS = {
    "start_idx": 0,
    "vision_idx": 0,
    "spatial_merge_size": 2,
    "t_index": [0, 1],
    "grid_hs": [8, 16],
    "grid_ws": [12, 20],
}
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 Tensor, ndim 2, dtype family int, shape (3, 48) — shape (3, 48) 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
get_ulysses_sequence_parallel_world_size Ran
ran; our contract draft was wrong, not the code
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("5bc06ef1058a26db")
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 Mock. 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 torch.distributed as dist
from unittest.mock import Mock, MagicMock

# Set seed for reproducibility
torch.manual_seed(0)

# Since we're in a non-distributed environment, we need to mock the ProcessGroup
# The function get_ulysses_sequence_parallel_world_size accepts an optional ProcessGroup parameter

# Create a mock ProcessGroup
mock_process_group = Mock(spec=dist.ProcessGroup)

ARGS = {
    "group": mock_process_group
}
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 Mock — a Mock 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
get_vila_version Ran
ran; our contract draft was wrong, not the code
nvlabs/long-rl/verl/utils/vila_remote_code/modeling_vila.py
code served (permissive licence) · get_code("554c742ab091b991")
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) and returned str. 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

torch.manual_seed(0)

# The function get_vila_version takes a model_path string and checks if any
# version string is contained in the lowercased path. It returns the matching
# version or None.

ARGS = {
    "model_path": "models/vila1.5-checkpoint"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
merge_captions Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/longvideo-reason/step3_merge_captions.py
code served (permissive licence) · get_code("34e4399c3e46211a")
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 os
import json
import tempfile
import shutil

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create sample JSON caption files
caption_data_1 = {
    'frame_0': 'First caption',
    'frame_1': 'Second caption',
    'frame_2': 'Third caption'
}

caption_data_2 = {
    'frame_0': 'Another first caption',
    'frame_1': 'Another second caption'
}

# Write test files
file1_path = os.path.join(temp_dir, 'video_001_captions_part1.json')
file2_path = os.path.join(temp_dir, 'video_001_captions_part2.json')

with open(file1_path, 'w', encoding='utf-8') as f:
    json.dump(caption_data_1, f)

with open(file2_path, 'w', encoding='utf-8') as f:
    json.dump(caption_data_2, f)

# Define video_files structure
video_files = {
    'video_001': [
        'video_001_captions_part1.json',
        'video_001_captions_part2.json'
    ]
}

ARGS = {
    'video_files': video_files,
    'input_folder': temp_dir
}
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 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
parse_reasoning Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/longvideo-reason/step5_parse_reasoning_data.py
code served (permissive licence) · get_code("d9f1e79118788b85")
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 re

reasoning_text = """QUESTION: What is the capital of France?
A. London
B. Paris
C. Berlin
D. Madrid
ANSWER: B
##### From [00:15]
- Paris is located in France
- It is the largest city in France
##### From [00:45]
- The Eiffel Tower is a famous landmark in Paris
- Paris is known as the City of Light
"""

ARGS = {
    'reasoning_text': reasoning_text
}
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 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
prepare_fa2_from_position_ids Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/models/transformers/flash_attention_utils.py
code served (permissive licence) · get_code("4049cf08f994464e")
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. 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

torch.manual_seed(0)

# Create small tensors for query, key, value
# Shape: (batch, seq_len, hidden_dim)
batch_size = 2
seq_len = 3
hidden_dim = 4

query = torch.randn(batch_size, seq_len, hidden_dim)
key = torch.randn(batch_size, seq_len, hidden_dim)
value = torch.randn(batch_size, seq_len, hidden_dim)

# Create position_ids tensor
# This should indicate sequence boundaries with 0s marking the start of new sequences
# Shape: (batch * seq_len,)
position_ids = torch.tensor([0, 1, 2, 0, 1, 2], dtype=torch.int64)

ARGS = {
    "query": query,
    "key": key,
    "value": value,
    "position_ids": position_ids,
}
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 tuple — a tuple 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
union_tensor_dict Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/protocol.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Chengsong-Huang/RelayLLM, is pointer only (licence: NONE) · get_code("ad658a1d6fe829ba")
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 Chengsong-Huang/RelayLLM, 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.

unpad_dataproto Ran
ran; our contract draft was wrong, not the code
NVlabs/Long-RL/verl/protocol.py
code served (permissive licence) · get_code("a91c18341292d50e")
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)

class DataProto:
    """Stand-in DataProto class that supports slicing via __getitem__"""
    def __init__(self, data):
        self.data = data
    
    def __getitem__(self, key):
        """Support slicing operation"""
        sliced_data = self.data[key]
        return DataProto(sliced_data)
    
    def __repr__(self):
        return f"DataProto({self.data})"

# Create a small DataProto instance with some data
data_tensor = torch.randn(2, 4)
data_proto = DataProto(data_tensor)

# Define arguments
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
all_to_all_tensor Not yet run
unverified (harvested, no recorded run)
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("50fceeb8e224ae4b")
How it ran

no invocation recorded.

flash_attention_forward Not yet run
unverified (harvested, no recorded run)
NVlabs/Long-RL/verl/models/transformers/flash_attention_utils.py
code served (permissive licence) · get_code("2058875a75c3ff14")
How it ran

no invocation recorded.

generate_gpt Not yet run
unverified (harvested, no recorded run)
NVlabs/Long-RL/longvideo-reason/step6_reformat_reasoning_data.py
code served (permissive licence) · get_code("c02118fc07296220")
How it ran

no invocation recorded.

get_rope_index_omni Not yet run
unverified (harvested, no recorded run)
NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py
code served (permissive licence) · get_code("867399f13a93e09a")
How it ran

no invocation recorded.

get_ulysses_sequence_parallel_group Not yet run
unverified (harvested, no recorded run)
hiyouga/easyr1/verl/utils/ulysses.py
code served (permissive licence) · get_code("c3db68c3c1890a1b")
How it ran

no invocation recorded.

pad_dataproto_to_divisor Not yet run
unverified (harvested, no recorded run)
NVlabs/Long-RL/verl/protocol.py
code served (permissive licence) · get_code("c7a1430e0e702826")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 7 the same month, 6 later) and 15 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 10 other papers
4 dated earlier, 1 the same month, 4 later, 1 undated
2503.17352 (2025-03)
OpenVLThinker: Complex Vision-Language Reasoning via Iterative SFT-RL Cycles
2505.11049 (2025-05)
GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
and 7 more not named here
get_kl_controller 9 other papers
4 dated earlier, 1 the same month, 3 later, 1 undated
2503.17352 (2025-03)
OpenVLThinker: Complex Vision-Language Reasoning via Iterative SFT-RL Cycles
2505.11049 (2025-05)
GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
and 6 more not named here
union_tensor_dict 7 other papers
4 dated earlier, 1 the same month, 1 later, 1 undated
2503.17352 (2025-03)
OpenVLThinker: Complex Vision-Language Reasoning via Iterative SFT-RL Cycles
2505.11049 (2025-05)
GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
and 4 more not named here
pad_dataproto_to_divisor 4 other papers
3 dated earlier, 1 the same month
2505.11049 (2025-05)
GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
2506.01908 (2025-06)
Reinforcement Learning Tuning for VideoLLMs: Reward Design and Data Efficiency
and 1 more not named here
prepare_fa2_from_position_ids 4 other papers
2 dated earlier, 1 the same month, 1 later
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
2506.01908 (2025-06)
Reinforcement Learning Tuning for VideoLLMs: Reward Design and Data Efficiency
2507.05386 (2025-07)
Reinforcement Fine-Tuning Naturally Mitigates Forgetting in Continual Post-Training
and 1 more not named here
compute_gae_advantage_return 3 other papers
1 dated earlier, 1 the same month, 1 later
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
2507.05386 (2025-07)
Reinforcement Fine-Tuning Naturally Mitigates Forgetting in Continual Post-Training
2605.07465 (2026-05)
SEIF: Self-Evolving Reinforcement Learning for Instruction Following
flash_attention_forward 3 other papers
1 dated earlier, 1 the same month, 1 later
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
2507.05386 (2025-07)
Reinforcement Fine-Tuning Naturally Mitigates Forgetting in Continual Post-Training
2605.07465 (2026-05)
SEIF: Self-Evolving Reinforcement Learning for Instruction Following
check_dot_in_model_path 1 other paper
1 dated earlier
2503.19903 (2025-03)
Scaling Vision Pre-Training to 4K Resolution
get_vila_version 1 other paper
1 dated earlier
2503.19903 (2025-03)
Scaling Vision Pre-Training to 4K Resolution

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

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 a full-stack framework that scales up reasoning in vision-language models (VLMs) to long videos, leveraging reinforcement learning. We address the unique challenges of long video reasoning by integrating three critical components: (1) a large-scale dataset, LongVideo-Reason, comprising 104K long video QA pairs with high-quality reasoning annotations across diverse domains such as sports, games, and vlogs; (2) a two-stage training pipeline that extends VLMs with chainof-thought supervised fine-tuning (CoT-SFT) and reinforcement learning (RL); and (3) a training infrastructure for long video RL, named Multi-modal Reinforcement Sequence Parallelism (MR-SP), which incorporates sequence parallelism and a vLLM-based engine tailored for long video, using cached video embeddings for efficient rollout and prefilling. In our experiments, LongVILA-R1-7B achieves strong performance on video benchmarks, reaching 65.1% and 71.1% accuracy on VideoMME without and with subtitles, respectively, and consistently outperforming LongVILA-7B across multiple benchmarks. Moreover, LongVILA-R1-7B supports processing up to 8,192 video frames per video, and configurable FPS settings. Notably, our MR-SP system achieves up to 2.1× speedup on long video RL training. In addition, we release our training system for public availability that supports RL training on various modalities (video, text, and audio), various models (VILA and Qwen series), and even image and video generation models. On a single A100 node (8 GPUs), it supports RL training on hour-long videos (e.g., 3,600 frames). Code and models are available at https://github.com/NVlabs/Long-RL and https://huggingface.co/Efficient-Large-Model/LongVILA-R1-7B.

For agents

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

get_harvested_code_for_paper("2507.07966")
get_code_for_paper("2507.07966")
have("2507.07966")

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

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

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

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

Connect an agent — have() is free.