SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.20512 · 2025

OctoThinker: Mid-training Incentivizes Reinforcement Learning Scaling

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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; 1 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 13 failures of our instrument; 1 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.20512.json · badge: /api/ran/2506.20512.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
gair-nlp/octothinker canonical (classifier label)
classifier basis: census
16 ran · 1 no recorded run
FunctionStatusWhere it lives
aggregate_metrics Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/summarize_results.py
code served (permissive licence) · get_code("8b9e2baf73bb9a6f")
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 json
import tempfile
import os

# Create temporary directory and metric files
temp_dir = tempfile.mkdtemp()

# Create first metric file
metric1 = {
    'n_samples': 100,
    'accuracy': 0.95,
    'loss': 0.05
}
path1 = os.path.join(temp_dir, 'metric1.json')
with open(path1, 'w') as f:
    json.dump(metric1, f)

# Create second metric file
metric2 = {
    'n_samples': 50,
    'accuracy': 0.90,
    'loss': 0.10
}
path2 = os.path.join(temp_dir, 'metric2.json')
with open(path2, 'w') as f:
    json.dump(metric2, f)

# Define ARGS
ARGS = {
    'paths': [path1, path2]
}
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
aggregate_predictions Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/summarize_results.py
code served (permissive licence) · get_code("33425041e7f88b7f")
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 json
import tempfile
import os

# Create temporary JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create valid JSON file 1
path1 = os.path.join(temp_dir, "predictions1.json")
with open(path1, 'w') as f:
    json.dump([{"id": 1, "prediction": 0.9}, {"id": 2, "prediction": 0.7}], f)

# Create valid JSON file 2
path2 = os.path.join(temp_dir, "predictions2.json")
with open(path2, 'w') as f:
    json.dump([{"id": 3, "prediction": 0.8}], f)

# Create invalid JSON file (will be skipped due to try-except)
path3 = os.path.join(temp_dir, "predictions3.json")
with open(path3, 'w') as f:
    f.write("invalid json content {{{")

# Define arguments
ARGS = {
    "paths": [path1, path2, path3]
}
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
extract_boxed_answers Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/data_processing/answer_extraction.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PKU-SEC-Lab/SPEX, is pointer only (licence: NONE) · get_code("6390dea763ce122e")
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 PKU-SEC-Lab/SPEX, 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.

extract_program Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/eval/eval_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ChengpengLi1003/CoRT, is pointer only (licence: NONE) · get_code("1d961161c71cc153")
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 ChengpengLi1003/CoRT, 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.

extract_program_output Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/data_processing/answer_extraction.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PKU-SEC-Lab/SPEX, is pointer only (licence: NONE) · get_code("0772e5020f6b0849")
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 PKU-SEC-Lab/SPEX, 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.

generate_completions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gair-nlp/octothinker/eval/eval/utils.py
code served (permissive licence) · get_code("73f280086b2714ce")
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 2, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from transformers import PreTrainedModel, PretrainedConfig

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.pad_token_id = 0
        self.eos_token_id = 2
        self.vocab_size = 100
    
    def __call__(self, texts, padding=None, return_tensors=None, add_special_tokens=False):
        # Simulate tokenization
        if isinstance(texts, str):
            texts = [texts]
        
        # Create token ids (simulated)
        batch_size = len(texts)
        seq_length = 5
        
        input_ids = torch.randint(3, 100, (batch_size, seq_length))
        attention_mask = torch.ones((batch_size, seq_length), dtype=torch.long)
        
        class TokenOutput:
            def __init__(self, input_ids, attention_mask):
                self.input_ids = input_ids
                self.attention_mask = attention_mask
        
        return TokenOutput(input_ids, attention_mask)
    
    def decode(self, token_ids, skip_special_tokens=False):
        # Simulate decoding
        if isinstance(token_ids, torch.Tensor):
            token_ids = token_ids.tolist()
        return f"decoded_text_{sum(token_ids) if isinstance(token_ids, list) else token_ids}"
    
    def batch_decode(self, token_ids, skip_special_tokens=False):
        # Simulate batch decoding
        result = []
        if isinstance(token_ids, torch.Tensor):
            for i in range(token_ids.shape[0]):
                result.append(self.decode(token_ids[i], skip_special_tokens))
        else:
            for ids in token_ids:
                result.append(self.decode(ids, skip_special_tokens))
        return result

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 100)
        self.device_attr = torch.device('cpu')
    
    @property
    def device(self):
        return self.device_attr
    
    def generate(self, input_ids, attention_mask=None, stopping_criteria=None, **kwargs):
        # Simulate generation - return padded token sequences
        batch_size = input_ids.shape[0]
        prompt_length = input_ids.shape[1]
        max_new_tokens = kwargs.get('max_new_tokens', 10)
        num_return_sequences = kwargs.get('num_return_sequences', 1)
        
        # Generate output tokens
        output_length = prompt_length + max_new_tokens
        output_ids = torch.randint(3, 100, (batch_size * num_return_sequences, output_length))
        
        # Copy input_ids into output
        for i in range(batch_size):
            output_ids[i * num_return_sequences:(i + 1) * num_return_sequences, :prompt_length] = input_ids[i]
        
        return output_ids

# Set up arguments
tokenizer = MinimalTokenizer()
model = MinimalModel()
prompts = ["Hello world", "How are you"]

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'prompts': prompts,
    'batch_size': 2,
    'stop_id_sequences': [[2], [3]],
    'end_of_generation_id_sequence': [2],
    'disable_tqdm': True,
    'max_new_tokens': 10,
    'num_return_sequences': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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_next_word_predictions Ran
ran on a synthesized input
gair-nlp/octothinker/eval/eval/utils.py
code served (permissive licence) · get_code("19dce514835bd816")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a minimal mock model
class MockModel(nn.Module):
    def __init__(self, vocab_size=1000, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, vocab_size)
        self.device_type = 'cpu'
    
    @property
    def device(self):
        class Device:
            type = 'cpu'
        return Device()
    
    def forward(self, input_ids, attention_mask):
        # Simulate model output
        batch_size = input_ids.shape[0]
        logits = self.linear(torch.randn(batch_size, 4))
        
        class Output:
            pass
        
        output = Output()
        output.logits = logits.unsqueeze(1)  # Add sequence dimension
        return output

# Create a minimal mock tokenizer
class MockTokenizer:
    def __init__(self):
        self.vocab = {i: f"token_{i}" for i in range(1000)}
    
    def __call__(self, texts, padding=None, return_tensors=None, add_special_tokens=False):
        batch_size = len(texts)
        seq_len = 3
        
        class TokenizerOutput:
            def __init__(self):
                self.input_ids = torch.randint(0, 100, (batch_size, seq_len))
                self.attention_mask = torch.ones(batch_size, seq_len)
        
        return TokenizerOutput()
    
    def convert_ids_to_tokens(self, ids):
        if isinstance(ids, torch.Tensor):
            ids = ids.tolist()
        if isinstance(ids, list):
            return [f"token_{i}" for i in ids]
        return f"token_{ids}"

model = MockModel(vocab_size=1000, hidden_dim=4)
tokenizer = MockTokenizer()
prompts = ["Hello world", "How are you"]
candidate_token_ids = [10, 20, 30, 40]

ARGS = {
    "model": model,
    "tokenizer": tokenizer,
    "prompts": prompts,
    "candidate_token_ids": candidate_token_ids,
    "batch_size": 2,
    "return_token_predictions": False,
    "disable_tqdm": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
markup_question Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/run_subset_parallel.py
code served (permissive licence) · get_code("de0231790ab22287")
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

ARGS = {
    'args': None,
    'item': {
        'messages': [
            {'content': 'What is 2+2?'},
            {'content': 'The answer is 4.'},
            {'content': 'What is 3+3?'},
            {'content': 'The answer is 6.'},
            {'content': 'What is 5+5?'}
        ]
    },
    'language': 'en',
    'src': 'test_source',
    'task': 'cot'
}
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
normalize_numeric Ran
ran, honoured the contract we drafted
gair-nlp/octothinker/eval/eval/ocwcourses_eval_utils.py
code served (permissive licence) · get_code("1c2220bf6666327d")
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 float, 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 torch
import numpy as np
from sympy.parsing.latex import parse_latex

# The function takes a single parameter 's' which should be a string or None
# It processes the string by removing units and then tries to convert to float
# or parse as LaTeX expression

ARGS = {
    's': '42.5 eV'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sympy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
normalize_symbolic_equation Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/eval/ocwcourses_eval_utils.py
code served (permissive licence) · get_code("73354091e7f44255")
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 sympy
from sympy.parsing.latex import parse_latex

INVALID_ANSWER = '[invalidanswer]'

def normalize_symbolic_equation(s):
    if not isinstance(s, str):
        return INVALID_ANSWER
    if s.startswith('\\['):
        s = s[2:]
    if s.endswith('\\]'):
        s = s[:-2]
    s = s.replace('\\left(', '(')
    s = s.replace('\\right)', ')')
    s = s.replace('\\\\', '\\')
    if s.startswith('$') or s.endswith('$'):
        s = s.strip('$')
    try:
        maybe_expression = parse_latex(s)
        if not isinstance(maybe_expression, sympy.core.relational.Equality):
            return INVALID_ANSWER
        else:
            return maybe_expression
    except:
        return INVALID_ANSWER


# Valid LaTeX equation string that will parse to an Equality
valid_equation = r"x + y = z"

# Another valid test case with LaTeX delimiters
valid_equation_with_delimiters = r"\[a = b\]"

# Another valid test case with dollar signs
valid_equation_with_dollars = r"$p = q$"

# Test case with escaped parentheses
valid_equation_with_parens = r"\left(x + 1\right) = 2"

ARGS = {
    "s": valid_equation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sympy — 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
numeric_equality Ran
ran, violated the contract we drafted
gair-nlp/octothinker/eval/eval/ocwcourses_eval_utils.py
code served (permissive licence) · get_code("4951ea903a7ffa37")
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 numpy as np

ARGS = {
    "n1": 1.5,
    "n2": 1.48,
    "threshold": 0.01
}
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 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
parse_question Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/eval/eval_utils.py
code served (permissive licence) · get_code("49e328786ffb3f8f")
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

# Test with 'asdiv' dataset
example_asdiv = {
    'body': 'A store sells apples.',
    'question': 'How many apples are sold?'
}

# Test with 'svamp' dataset
example_svamp = {
    'Body': 'John has 5 apples',
    'Question': 'How many does he have?'
}

# Test with 'tabmwp' dataset
example_tabmwp = {
    'table_title': 'Sales Data',
    'table': '| Month | Sales |\n|-------|-------|\n| Jan   | 100   |',
    'question': 'What were the sales in January?',
    'choices': ['100', '200', '300']
}

# Test with generic dataset (fallback case)
example_generic = {
    'question': 'What is 2+2?'
}

# Example with 'problem' key
example_problem = {
    'problem': 'Solve this equation'
}

# Example with 'input' key
example_input = {
    'input': 'Process this input'
}

ARGS = {
    'example': example_asdiv,
    'data_name': 'asdiv'
}
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
read_csv_file Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/summarize_results.py
code served (permissive licence) · get_code("5ae15dd305f032e2")
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 DataFrame. 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 pandas as pd
import io

# Create a small CSV file in memory
csv_content = """name,age,city
Alice,25,New York
Bob,30,London
Charlie,35,Paris"""

csv_file_path = "/tmp/test_data.csv"

# Write the CSV content to a file
with open(csv_file_path, 'w') as f:
    f.write(csv_content)

ARGS = {
    "file_path": csv_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
read_data Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/utils.py
code served (permissive licence) · get_code("3deb39de933b985a")
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 json
import tempfile
import os

# Create temporary JSON file
json_fd, json_path = tempfile.mkstemp(suffix='.json')
json_data = [{"key": "value1"}, {"key": "value2"}]
with os.fdopen(json_fd, 'w') as f:
    json.dump(json_data, f)

# Create temporary JSONL file
jsonl_fd, jsonl_path = tempfile.mkstemp(suffix='.jsonl')
with os.fdopen(jsonl_fd, 'w') as f:
    f.write(json.dumps({"item": "first"}) + '\n')
    f.write(json.dumps({"item": "second"}) + '\n')

ARGS = {
    "path": json_path
}
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
shuffle Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gair-nlp/octothinker/eval/utils.py
code served (permissive licence) · get_code("3358374eed4646e4")
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 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 numpy as np
import random

def set_seed(seed):
    if seed > 0:
        random.seed(seed)
        np.random.seed(seed)

def shuffle(data, seed):
    if seed < 0:
        return data
    set_seed(seed)
    indices = list(range(len(data)))
    np.random.shuffle(indices)
    data = [data[i] for i in indices]
    return data

# Setup: data should be a list that can be indexed and shuffled
data = [1, 2, 3, 4, 5]

# seed can be positive (shuffle will happen), negative (no shuffle), or zero
seed = 42

ARGS = {
    "data": data,
    "seed": seed,
}
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 list, ndim 1, 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
strip_string Ran
ran; our contract draft was wrong, not the code
gair-nlp/octothinker/eval/data_processing/answer_extraction.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PKU-SEC-Lab/SPEX, is pointer only (licence: NONE) · get_code("5abed389274c4c03")
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 PKU-SEC-Lab/SPEX, 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.

score_completions Not yet run
unverified (harvested, no recorded run)
gair-nlp/octothinker/eval/eval/utils.py
code served (permissive licence) · get_code("8c63844c66973f8d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
extract_boxed_answers 7 other papers
5 dated earlier, 1 later, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
and 4 more not named here
strip_string 6 other papers
4 dated earlier, 1 later, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
and 3 more not named here
extract_program 5 other papers
4 dated earlier, 1 later
2309.17452 (2023-09)
ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
2403.13315 (2024-03)
PuzzleVQA: Diagnosing Multimodal Reasoning Challenges of Language Models with Abstract Visual Patterns
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
and 2 more not named here
extract_program_output 5 other papers
3 dated earlier, 1 later, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
and 2 more not named here
get_next_word_predictions 3 other papers
3 dated earlier
2310.06830 (2023-10)
Lemur: Harmonizing Natural Language and Code for Language Agents
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2502.12067 (2025-02)
TokenSkip: Controllable Chain-of-Thought Compression in LLMs
read_data 3 other papers
2 dated earlier, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
2502.12067 (2025-02)
TokenSkip: Controllable Chain-of-Thought Compression in LLMs
aggregate_metrics 2 other papers
1 dated earlier, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
aggregate_predictions 2 other papers
1 dated earlier, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
markup_question 2 other papers
1 dated earlier, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
parse_question 2 other papers
2 dated earlier
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2502.12067 (2025-02)
TokenSkip: Controllable Chain-of-Thought Compression in LLMs
score_completions 2 other papers
2 dated earlier
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2502.12067 (2025-02)
TokenSkip: Controllable Chain-of-Thought Compression in LLMs
shuffle 2 other papers
1 dated earlier, 1 same year, order not determinable
2402.03300 (2024-02)
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
numeric_equality 1 other paper
1 dated earlier
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs

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

Different base language model families, such as Llama and Qwen, exhibit divergent behaviors during post-training with reinforcement learning (RL), especially on reasoning-intensive tasks. What makes a base language model suitable for reinforcement learning? Gaining deeper insight into this question is essential for developing RL-scalable foundation models of the next generation. In this work, we investigate how mid-training strategies shape RL dynamics, focusing on two representative model families: Qwen and Llama. Our study reveals that (1) high-quality mathematical corpora, such as MegaMath-Web-Pro, significantly improve both base model and RL performance, while existing alternatives (e.g., FineMath-4plus) fail to do so; (2) further adding QA-style data, particularly long chain-of-thought (CoT) reasoning examples, enhances RL outcomes, and instruction data further unlocks this effect; (3) while long-CoT improves reasoning depth, it can also induce verbosity of model responses and unstability of RL training, underscoring the importance of data formatting; (4) scaling mid-training consistently leads to stronger downstream RL performance. Building on these insights, we introduce a two-stage mid-training strategy, Stable-then-Decay, in which base models are first trained on 200B tokens with a constant learning rate, followed by 20B tokens across three CoT-focused branches with learning rate decay. This yields OctoThinker, a family of models demonstrating strong RL compatibility and closing the performance gap with more RL-friendly model families, i.e., Qwen. We hope our work will help shape pre-training strategies for foundation models in the RL era. To support further research, we release our open-source models along with a curated math reasoning-intensive corpus of over 70 billion tokens (i.e., MegaMath-Web-Pro-Max).

For agents

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

get_harvested_code_for_paper("2506.20512")
get_code_for_paper("2506.20512")
have("2506.20512")

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

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

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

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

Connect an agent — have() is free.