SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.16828 · 2025

Process Reward Models That Think

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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 7 have no contract verdict; 1 failure of our instrument; 2 no recorded run), 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/2504.16828.json · badge: /api/ran/2504.16828.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
mukhal/thinkprm canonical (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
FunctionStatusWhere it lives
clean_traj Ran
ran on a synthesized input
mukhal/thinkprm/dataset/prm_dataset.py
code served (permissive licence) · get_code("9bb1a529691054e6")
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 re

def clean_traj(traj_str):
    traj_str = re.sub('\\nStep \\d+:', '', traj_str).strip()
    traj_str = re.sub('Step \\d+:', '', traj_str).strip()
    traj_str = traj_str.replace('The answer is:', 'The answer is').strip()
    traj_str = traj_str.replace('. The answer is', ' The answer is').replace(' The answer is', '. The answer is')
    traj_str = re.sub('<<.*?>>', '', traj_str).strip()
    traj_str = traj_str.split('\n\n')[0].strip()
    return traj_str

# Create a sample trajectory string with various formatting patterns
sample_traj = """Step 1: Start the calculation
\nStep 2: Add the numbers
Step 3: Verify the result

Some reasoning here <<intermediate_calc>>

The answer is: 42"""

ARGS = {
    'traj_str': sample_traj
}
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 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
format_train_verification_cot_for_thinkprm Ran
ran on a synthesized input
mukhal/thinkprm/utils/helper.py
code served (permissive licence) · get_code("97eb4c263188e55d")
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
from transformers import AutoTokenizer

# Create a minimal tokenizer mock that implements the required methods
class MinimalTokenizer:
    def __init__(self):
        self.eos_token = "</s>"
    
    def apply_chat_template(self, messages, tokenize=False, add_generation_prompt=False):
        """
        Minimal implementation that formats chat messages.
        """
        result = ""
        for msg in messages:
            role = msg['role']
            content = msg['content']
            result += f"[{role}]\n{content}\n"
        
        if add_generation_prompt:
            result += "[assistant]\n"
        
        return result

# Create test data
tokenizer = MinimalTokenizer()

problem = "Solve for x: 2x + 3 = 7"

solution = "Step 1: Subtract 3 from both sides: 2x = 4\nStep 2: Divide by 2: x = 2"

# Test case with cot (chain of thought)
cot_with_think = "<think>\nLet's verify step by step:\nStep 1 is correct because 7 - 3 = 4.\nStep 2 is correct because 4 / 2 = 2.\n</think>\nThe solution is correct."

# Test case without cot
cot_none = None

ARGS = {
    "tokenizer": tokenizer,
    "problem": problem,
    "solution": solution,
    "cot": cot_with_think
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
format_verification_cot_for_thinkprm Ran
ran on a synthesized input
mukhal/thinkprm/utils/helper.py
code served (permissive licence) · get_code("967e93846e542206")
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
from transformers import AutoTokenizer

class StandInTokenizer:
    def apply_chat_template(self, messages, tokenize=False, add_generation_prompt=False):
        # Simple implementation that formats chat messages
        result = ""
        for msg in messages:
            role = msg.get('role', 'user')
            content = msg.get('content', '')
            result += f"[{role.upper()}]: {content}\n"
        if add_generation_prompt:
            result += "[ASSISTANT]:"
        return result

ARGS = {
    'tokenizer': StandInTokenizer(),
    'problem': 'Solve for x: 2x + 5 = 13',
    'solution': 'Step 1: Subtract 5 from both sides: 2x = 8\nStep 2: Divide by 2: x = 4',
    'cot': None,
    'long_cot': False,
    'instruction': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
generate_completions Ran
ran; our contract draft was wrong, not the code
mukhal/thinkprm/search-and-learn/evaluation/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from fanqiwan/FuseAI, is pointer only (licence: NONE) · get_code("1525d8bc0fc8d5a0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from fanqiwan/FuseAI, 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.

judge_answer Ran
ran on a synthesized input
mukhal/thinkprm/utils/answer_utils.py
code served (permissive licence) · get_code("34f3f784f648c968")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - output: Optional[str] - can be None or a string representation of int/float/other
# - answer: str - a string representation of int/float/other
# The function tries to parse both as int, then float, then compares as strings

# Test case 1: Both are valid integers
output_1 = "42"
answer_1 = "42"

# Test case 2: output is None
output_2 = None
answer_2 = "100"

# Test case 3: Both are valid floats
output_3 = "3.14"
answer_3 = "3.14"

# Test case 4: String comparison (when not parseable as numbers)
output_4 = "hello"
answer_4 = "hello"

# Use the first test case as the primary argument set
ARGS = {
    "output": output_1,
    "answer": answer_1
}
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 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
preprocess_longcot Ran
ran on a synthesized input
mukhal/thinkprm/prm/thinkprm_api.py
code served (permissive licence) · get_code("1a2bbb70c3c71e1e")
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

def preprocess_longcot(long_cot: str) -> str:
    """Process the chain-of-thought text before verification.
    
    Args:
        long_cot: The chain-of-thought text to process
        
    Returns:
        The processed text with think tokens removed and content extracted
    """
    if not long_cot:
        print('WARNING: Empty solution provided')
        return ''
    return long_cot.split('</think>')[0].strip()


ARGS = {
    'long_cot': 'This is my reasoning</think>and this is after'
}
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
retrieve_answer Ran
ran on a synthesized input
mukhal/thinkprm/utils/answer_utils.py
code served (permissive licence) · get_code("f319752266d199ba")
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 re
from typing import Optional

def retrieve_answer(output: str) -> Optional[str]:
    match = re.match('.*The answer is .*?([ $.0-9,\\-]+).*\\..*', output)
    if match is None:
        return None
    answer = match[1].replace(',', '').replace('$', '').replace(' ', '')
    if '=' in answer:
        answer = answer[answer.rindex('=') + 1:]
    return answer


# Test cases to construct valid arguments
test_output_1 = "The answer is $1,234.56."
test_output_2 = "The answer is 42."
test_output_3 = "The answer is = 100."
test_output_4 = "The answer is 5 - 3."
test_output_5 = "No answer here"

ARGS = {
    "output": test_output_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
retrieve_answer_from_dataset Ran
ran on a synthesized input
mukhal/thinkprm/utils/answer_utils.py
code served (permissive licence) · get_code("83252db0b404cdb0")
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 re

def retrieve_answer_from_dataset(answer: str) -> str:
    return re.match('[\\S\\s]*#### (.*)$', answer)[1]

# The function expects a string that contains "####" followed by the answer text
# We need to construct a valid answer string that matches the regex pattern
test_answer = "Some question text\n#### The correct answer"

ARGS = {
    "answer": test_answer
}
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 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
format_verification_cot_no_think Not yet run
unverified (harvested, no recorded run)
mukhal/thinkprm/utils/helper.py
code served (permissive licence) · get_code("388299eedc9e4ec2")
How it ran

no invocation recorded.

load_hf_lm_and_tokenizer Not yet run
unverified (harvested, no recorded run)
mukhal/thinkprm/search-and-learn/evaluation/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from YangLing0818/SuperCorrect-llm, is pointer only (licence: NONE) · get_code("ee71a94d9dd1b8e9")
How it ran

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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 8 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
load_hf_lm_and_tokenizer 18 other papers
7 dated earlier, 2 the same month, 9 later
2405.14365 (2024-05)
JiuZhang3.0: Efficiently Improving Mathematical Reasoning by Training Small Data Synthesis Models
2408.07471 (2024-08)
Bridging and Modeling Correlations in Pairwise Data for Direct Preference Optimization
2410.07985 (2024-10)
Omni-MATH: A Universal Olympiad Level Mathematic Benchmark For Large Language Models
and 15 more not named here
generate_completions 17 other papers
6 dated earlier, 2 the same month, 9 later
2405.14365 (2024-05)
JiuZhang3.0: Efficiently Improving Mathematical Reasoning by Training Small Data Synthesis Models
2408.07471 (2024-08)
Bridging and Modeling Correlations in Pairwise Data for Direct Preference Optimization
2410.07985 (2024-10)
Omni-MATH: A Universal Olympiad Level Mathematic Benchmark For Large Language Models
and 14 more not named here

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

Step-by-step verifiers -- also known as process reward models (PRMs) -- are a key ingredient for test-time scaling. PRMs require step-level supervision, making them expensive to train. This work aims to build data-efficient PRMs as verbalized step-wise reward models that verify every step in the solution by generating a verification chain-of-thought (CoT). We propose ThinkPRM, a long CoT verifier fine-tuned on orders of magnitude fewer process labels than those required by discriminative PRMs. Our approach capitalizes on the inherent reasoning abilities of long CoT models, and outperforms LLM-as-a-Judge and discriminative verifiers -- using only 1% of the process labels in PRM800K -- across several challenging benchmarks. Specifically, ThinkPRM beats the baselines on ProcessBench, MATH-500, and AIME '24 under best-of-N selection and reward-guided search. In an out-of-domain evaluation on a subset of GPQA-Diamond and LiveCodeBench, our PRM surpasses discriminative verifiers trained on the full PRM800K by 8% and 4.5%, respectively. Lastly, under the same token budget, ThinkPRM scales up verification compute more effectively compared to LLM-as-a-Judge, outperforming it by 7.2% on a subset of ProcessBench. Our work highlights the value of generative, long CoT PRMs that can scale test-time compute for verification while requiring minimal supervision for training. Our code, data, and models are released at https://github.com/mukhal/thinkprm.

For agents

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

get_harvested_code_for_paper("2504.16828")
get_code_for_paper("2504.16828")
have("2504.16828")

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

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

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

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

Connect an agent — have() is free.