SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.20122 · 2025

Self-Training Elicits Concise Reasoning in Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.20122.json · badge: /api/ran/2502.20122.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
tergelmunkhbat/concise-reasoning canonical (classifier label)
classifier basis not recorded on the link
15 ran · 1 no recorded run
FunctionStatusWhere it lives
add_parsed_budget Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/estimated_budget_process.py
code served (permissive licence) · get_code("07c47b62bc5a9ca7")
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 re

def add_parsed_budget(data):
    for item in data:
        rationale = item.get('rationale', '')
        rationale = rationale.replace(',', '')
        match = re.search('Budget:\\s*(\\[\\[(\\d+)\\]\\]|\\d+)', rationale)
        if match:
            budget = match.group(2) if match.group(2) else match.group(1)
            item['budget_estimate'] = str(int(budget))
        else:
            last_number_match = re.findall('\\d+', rationale)
            item['budget_estimate'] = int(last_number_match[-1]) if last_number_match else None
        item['budget_estimate'] = str(item['budget_estimate'])
        del item['rationale']
        del item['answer']
        del item['token_count']
    return data

ARGS = {
    'data': [
        {
            'rationale': 'The answer requires Budget: [[500]] tokens for processing',
            'answer': 'sample answer 1',
            'token_count': 450
        },
        {
            'rationale': 'This one has Budget: 250 tokens needed, approximately 100 more for verification',
            'answer': 'sample answer 2',
            'token_count': 300
        },
        {
            'rationale': 'No explicit budget marker but contains numbers like 75 and 150 at the end',
            'answer': 'sample answer 3',
            'token_count': 200
        }
    ]
}
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
check_patterns Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/estimated_budget_process.py
code served (permissive licence) · get_code("8b057c6909544771")
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 int, ndim 0, dtype family int, 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)

# Construct test data matching the function's requirements
# The function iterates over data and calls .get('rationale', '') on each item
# It looks for 'Budget:' in the rationale string
data = [
    {
        'rationale': 'This item contains Budget: allocation for Q1',
        'other_field': 'some value'
    },
    {
        'rationale': 'Regular expense report without budget mention',
        'other_field': 'another value'
    },
    {
        'rationale': 'Budget: increase needed for operations, Budget: approval required',
        'other_field': 'third value'
    },
    {
        'rationale': 'No special markers here'
    },
    {
        'other_field': 'missing rationale field'
    }
]

ARGS = {
    'data': data
}
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 int, ndim 0, dtype family int, 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
compare_answers Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/preprocess.py
code served (permissive licence) · get_code("46e84dfabd0695d0")
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 ast

torch_seed = 0

# Based on the function body, we need:
# - question: a string that may contain 'separated by commas'
# - parsed_label: either a string that can be eval'd or a list/tuple of iterables
# - parsed_answer: either a string that can be eval'd or a list/tuple of iterables

# The function converts parsed_label and parsed_answer to sets of strings
# If 'separated by commas' is in question, it creates frozensets of string elements
# Otherwise it creates regular sets of string elements

ARGS = {
    "question": "What are the colors separated by commas?",
    "parsed_label": [["red", "blue"], ["green", "yellow"]],
    "parsed_answer": [["red", "blue", "orange"]]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_boxed_answers Ran
ran; our contract draft was wrong, not the code
tergelmunkhbat/concise-reasoning/src/math_parser.py
pointer only (licence: MIT); 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 (MIT), 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.

filter_rationales Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/preprocess.py
code served (permissive licence) · get_code("5ee5c0c3dc69f851")
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 numpy as np

# Build valid arguments for filter_rationales
data = [
    {
        'input': 'What are the main colors?',
        'label': ['red', 'blue'],
        'answer': ['red', 'blue'],
        'rationale': 'The primary colors are red, blue, and yellow.',
        'token_count': 15
    },
    {
        'input': 'What are the main colors?',
        'label': ['red', 'blue'],
        'answer': ['red', 'blue'],
        'rationale': 'The primary colors are red, blue, and yellow.',
        'token_count': 15
    },
    {
        'input': 'What is 2+2?',
        'label': 4,
        'answer': 4,
        'rationale': 'Two plus two equals four by basic arithmetic.',
        'token_count': 12
    },
    {
        'input': 'What is the capital of France?',
        'label': 'Paris',
        'answer': 'Paris',
        'rationale': 'Paris is the capital city of France and located on the Seine river.',
        'token_count': 25
    },
    {
        'input': 'What is the capital of France?',
        'label': 'Paris',
        'answer': 'London',
        'rationale': 'This is an incorrect answer.',
        'token_count': 8
    },
    {
        'input': 'List items separated by commas',
        'label': [['apple', 'banana'], ['orange', 'grape']],
        'answer': [['apple', 'banana']],
        'rationale': 'Fruits can be grouped in various ways.',
        'token_count': 20
    }
]

ARGS = {
    'data': data,
    'dataset': 'gsm8k',
    'max_tokens': 100,
    'min_tokens': 5,
    'only_correct': True
}
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 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
generate_text Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/training_utils.py
code served (permissive licence) · get_code("84abbf776f80eaf8")
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. 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 argparse import Namespace

torch.manual_seed(0)

# Mock tokenizer with required methods and attributes
class MockTokenizer:
    def __init__(self):
        self.eos_token_id = 2
    
    def batch_decode(self, token_ids, skip_special_tokens=False):
        # Return a list of strings, one for each item in batch
        return ["generated text one", "generated text two"]

# Mock model with generate method
class MockModel(nn.Module):
    def __init__(self, vocab_size=100):
        super().__init__()
        self.vocab_size = vocab_size
        self.embedding = nn.Embedding(vocab_size, 4)
        self.lm_head = nn.Linear(4, vocab_size)
    
    def generate(self, input_ids, attention_mask=None, max_new_tokens=10, 
                 temperature=1.0, top_k=50, top_p=0.95, do_sample=False):
        # Simulate generation by returning input_ids + some generated tokens
        batch_size = input_ids.shape[0]
        input_len = input_ids.shape[1]
        # Generate output with input_ids + some new tokens
        # Include eos_token_id (2) at the end
        new_tokens = torch.randint(3, self.vocab_size, (batch_size, max_new_tokens))
        # Insert eos token somewhere in the middle for testing
        new_tokens[:, min(3, max_new_tokens-1)] = 2
        output = torch.cat([input_ids, new_tokens], dim=1)
        return output

# Create tokenized prompts dict
prompts_tokenized = {
    'input_ids': torch.tensor([[10, 11, 12, 13], [20, 21, 22, 23]], dtype=torch.long),
    'attention_mask': torch.tensor([[1, 1, 1, 1], [1, 1, 1, 1]], dtype=torch.long)
}

# Create args namespace
args = Namespace(
    max_new_tokens=10,
    temperature=0.7,
    top_k=50,
    top_p=0.95,
    do_sample=True
)

# Create model and tokenizer
model = MockModel(vocab_size=100)
tokenizer = MockTokenizer()

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'prompts_tokenized': prompts_tokenized,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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_config_dir Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/utils.py
code served (permissive licence) · get_code("98694e37b00066e2")
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 argparse

ARGS = {
    'args': argparse.Namespace(
        prompt_system_key=None,
        prompt_system='default_system',
        dataset='imagenet',
        model_name='bert_base',
        prompt='q1',
        max_new_tokens=128,
        temperature=0.7,
        top_k=50,
        top_p=0.95,
        num_diverse_path=3,
        batch_size=16
    )
}
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
get_latest_checkpoint Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/model.py
code served (permissive licence) · get_code("ed87ec15885fe0aa")
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 os
import tempfile
import shutil

# Create a temporary directory with checkpoint subdirectories
temp_dir = tempfile.mkdtemp()

# Create mock checkpoint directories
os.makedirs(os.path.join(temp_dir, 'checkpoint-100'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'checkpoint-500'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'checkpoint-300'), exist_ok=True)

# Create placeholder files in checkpoints
for checkpoint_dir in ['checkpoint-100', 'checkpoint-500', 'checkpoint-300']:
    with open(os.path.join(temp_dir, checkpoint_dir, 'config.json'), 'w') as f:
        f.write('{}')

ARGS = {
    'model_path': 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 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_train_dir Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/utils.py
code served (permissive licence) · get_code("8a0e38e1ecf7a971")
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 argparse

ARGS = {
    'args': argparse.Namespace(
        dataset='cifar10',
        model_name='resnet18',
        type='supervised',
        percentage=100,
        grad_steps=1000,
        seed=42,
        lr=0.001,
        batch_size=32
    )
}
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
load_model Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/model.py
code served (permissive licence) · get_code("ab895046a21a97a7")
How it ran

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

import os
import torch
from unittest.mock import Mock, MagicMock
import tempfile
import shutil

torch.manual_seed(0)

# Create a temporary directory to simulate a model path
temp_dir = tempfile.mkdtemp()

# Create a mock tokenizer
mock_tokenizer = Mock()
mock_tokenizer.pad_token_id = None
mock_tokenizer.eos_token_id = 0

# Create a mock model
mock_model = Mock()
mock_model.generation_config = Mock()
mock_model.generation_config.pad_token_id = None

# Mock AutoTokenizer.from_pretrained
from transformers import AutoTokenizer, AutoModelForCausalLM
original_tokenizer_from_pretrained = AutoTokenizer.from_pretrained
original_model_from_pretrained = AutoModelForCausalLM.from_pretrained

def mock_tokenizer_from_pretrained(path, legacy=True):
    tokenizer = Mock()
    tokenizer.pad_token_id = None
    tokenizer.eos_token_id = 0
    return tokenizer

def mock_model_from_pretrained(path, device_map=None, torch_dtype=None, use_cache=True):
    model = Mock()
    model.generation_config = Mock()
    model.generation_config.pad_token_id = None
    return model

AutoTokenizer.from_pretrained = mock_tokenizer_from_pretrained
AutoModelForCausalLM.from_pretrained = mock_model_from_pretrained

ARGS = {
    "model_path": temp_dir,
    "device_map": "cpu",
    "type": "test"
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_fraction Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/math_parser.py
code served (permissive licence) · get_code("d00d21477f6cf430")
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 parse_fraction(input_str):
    """
    Parses LaTeX-like fraction strings (including negatives) and evaluates them as float decimals.
    If execution exceeds the timeout limit, it raises an error.
    """
    cleaned_str = input_str.replace('\\dfrac', '').replace('\\frac', '')
    is_negative = cleaned_str.startswith('-')
    if is_negative:
        cleaned_str = cleaned_str[1:]
    cleaned_str_lst = cleaned_str.strip('{}').split('}{')
    if len(cleaned_str_lst) != 2:
        return None
    else:
        numerator = cleaned_str_lst[0]
        denominator = cleaned_str_lst[1]
    if re.fullmatch('-?\\d+', numerator):
        numerator = int(numerator)
    else:
        return None
    if re.fullmatch('-?\\d+', denominator):
        denominator = int(denominator)
        if denominator == 0:
            return None
    else:
        return None
    result = numerator / denominator
    if is_negative:
        result = -result
    return str(float(result))


ARGS = {
    "input_str": "\\frac{3}{4}"
}
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
process_file Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/estimated_budget_process.py
code served (permissive licence) · get_code("3edbfe5817ad1b08")
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 a temporary JSON Lines file with valid JSON objects
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_filename = temp_file.name

# Write test data to the file
test_data = [
    {"name": "Alice", "age": 30},
    {"name": "Bob", "age": 25},
    {"name": "Charlie", "age": 35}
]

for obj in test_data:
    temp_file.write(json.dumps(obj) + '\n')

temp_file.close()

ARGS = {
    "filename": temp_filename
}
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
process_file Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/preprocess.py
code served (permissive licence) · get_code("c687c5d4e753d025")
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 a temporary file with JSON lines content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_filename = temp_file.name

# Write sample JSON lines to the file
sample_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "data": [1, 2, 3]}
]

for item in sample_data:
    temp_file.write(json.dumps(item) + '\n')

temp_file.close()

# Define ARGS dict with the temporary filename
ARGS = {
    "filename": temp_filename
}
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
strip_string Ran
ran; our contract draft was wrong, not the code
tergelmunkhbat/concise-reasoning/src/math_parser.py
pointer only (licence: MIT); 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 (MIT), 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.

tokenize_function Ran
ran on a synthesized input
tergelmunkhbat/concise-reasoning/src/training_utils.py
code served (permissive licence) · get_code("0b6eb4d9aa2a6729")
How it ran

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

import torch
from transformers import AutoTokenizer
import warnings

torch.manual_seed(0)

# Create a minimal mock tokenizer that behaves like AutoTokenizer
class MockTokenizer:
    def __init__(self):
        self.padding_side = 'right'
        self.pad_token_id = 0
        self.model_max_length = 512
    
    def __call__(self, texts, return_tensors=None, padding=None, truncation=None, 
                 pad_to_multiple_of=None, add_special_tokens=None):
        # Return a mock tokenizer output that has .to() method
        if isinstance(texts, str):
            texts = [texts]
        
        # Create mock token ids - batch_size x seq_len
        batch_size = len(texts)
        # Make sequences of varying lengths to test padding
        seq_lengths = [4 + i % 3 for i in range(batch_size)]
        max_seq_len = max(seq_lengths) if seq_lengths else 4
        
        input_ids = torch.zeros((batch_size, max_seq_len), dtype=torch.long)
        attention_mask = torch.zeros((batch_size, max_seq_len), dtype=torch.long)
        
        for i, length in enumerate(seq_lengths):
            input_ids[i, :length] = torch.randint(1, 100, (length,))
            attention_mask[i, :length] = 1
        
        # Pad to multiple of 8 if specified
        if pad_to_multiple_of:
            remainder = max_seq_len % pad_to_multiple_of
            if remainder != 0:
                pad_len = pad_to_multiple_of - remainder
                input_ids = torch.nn.functional.pad(input_ids, (0, pad_len))
                attention_mask = torch.nn.functional.pad(attention_mask, (0, pad_len))
        
        return MockTokenizerOutput(input_ids, attention_mask)

class MockTokenizerOutput:
    def __init__(self, input_ids, attention_mask):
        self.input_ids = input_ids
        self.attention_mask = attention_mask
    
    def to(self, device):
        self.input_ids = self.input_ids.to(device)
        self.attention_mask = self.attention_mask.to(device)
        return self

# Setup arguments
inputs = [
    "Hello world",
    "This is a test",
    "Another sample text here"
]

tokenizer = MockTokenizer()
batch_size = 2
device = 'cpu'

ARGS = {
    'inputs': inputs,
    'tokenizer': tokenizer,
    'batch_size': batch_size,
    'device': device
}
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 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
load_model_with_flash_attention Not yet run
unverified (harvested, no recorded run)
tergelmunkhbat/concise-reasoning/src/model.py
code served (permissive licence) · get_code("f60f5bc6df5e6841")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 15 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 13 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
2 dated earlier, 2 the same month, 2 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
2 dated earlier, 1 the same month, 2 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

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

Repositories linked to this paper

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

Abstract

Chain-of-thought (CoT) reasoning has enabled large language models (LLMs) to utilize additional computation through intermediate tokens to solve complex tasks. However, we posit that typical reasoning traces contain many redundant tokens, incurring extraneous inference costs. Upon examination of the output distribution of current LLMs, we find evidence on their latent ability to reason more concisely, relative to their default behavior. To elicit this capability, we propose simple fine-tuning methods which leverage self-generated concise reasoning paths obtained by best-of-N sampling and few-shot conditioning, in task-specific settings. Our combined method achieves a 30% reduction in output tokens on average, across five model families on GSM8K and MATH, while maintaining average accuracy. By exploiting the fundamental stochasticity and in-context learning capabilities of LLMs, our self-training approach robustly elicits concise reasoning on a wide range of models, including those with extensive post-training. Code is available at https://github.com/TergelMunkhbat/concise-reasoning

For agents

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

get_harvested_code_for_paper("2502.20122")
get_code_for_paper("2502.20122")
have("2502.20122")

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

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

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

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

Connect an agent — have() is free.