SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.10071 · 2022

Large Language Models Are Reasoning Teachers

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 0 failures of our instrument; 2 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/2212.10071.json · badge: /api/ran/2212.10071.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
itsnamgyu/reasoning-teacher canonical (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
get_completion_data_path Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/paths.py
code served (permissive licence) · get_code("342c80134c65f9ad")
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

# Create a temporary directory to simulate the project structure
temp_dir = tempfile.mkdtemp()
PROJECT_PATH = temp_dir
SAVED_PATH = os.path.join(PROJECT_PATH, 'saved')
COMPLETION_DATA_PATH = os.path.join(SAVED_PATH, 'completion_data')

# Create the necessary directories
os.makedirs(COMPLETION_DATA_PATH, exist_ok=True)

# Define ARGS with all required parameters
ARGS = {
    'base_model': 'gpt2',
    'completion_key': 'v1_standard',
    'dataset_key': 'wikitext',
    'train_key': 'adam_lr0.001',
    'epoch': 42
}
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_dataset_path Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/paths.py
code served (permissive licence) · get_code("3df12d92fd1ba3ec")
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

# Create a temporary directory to simulate the project structure
temp_dir = tempfile.mkdtemp()
project_path = temp_dir
data_path = os.path.join(project_path, 'data')
dataset_path = os.path.join(data_path, 'dataset')

# Create the necessary directories
os.makedirs(dataset_path, exist_ok=True)

# Create a sample dataset file
sample_dataset_file = os.path.join(dataset_path, 'test_dataset.json')
with open(sample_dataset_file, 'w') as f:
    f.write('{}')

# Define the function with modified paths
PROJECT_PATH = project_path
DATA_PATH = os.path.join(PROJECT_PATH, 'data')
DATASET_PATH = os.path.join(DATA_PATH, 'dataset')

def get_dataset_path(dataset_key: str) -> str:
    return os.path.join(DATASET_PATH, '{}.json'.format(dataset_key))

# Define ARGS
ARGS = {
    'dataset_key': 'test_dataset'
}
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_json_value Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/oai/utils/metadata.py
code served (permissive licence) · get_code("2a6bb42a8d2676fc")
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 json
import os
import tempfile

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test.json")
test_data = {"key1": "value1", "key2": 42, "nested": {"inner": "data"}}
with open(json_path, "w") as f:
    json.dump(test_data, f)

ARGS = {
    "json_path": json_path,
    "key": "key1"
}
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_model_key Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/oai/utils/metadata.py
code served (permissive licence) · get_code("5cc7cc5521428f77")
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

ARGS = {
    'base_model_key': 'bert_base',
    'dataset_key': 'mnist',
    'train_key': 'adam_lr0.001'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_split_path Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/paths.py
code served (permissive licence) · get_code("c2bc595db0df3786")
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 json

# Create a temporary directory structure to simulate the project layout
temp_dir = tempfile.mkdtemp()
project_path = temp_dir
data_path = os.path.join(project_path, 'data')
split_path = os.path.join(data_path, 'split')
os.makedirs(split_path, exist_ok=True)

# Create a sample split file
sample_split_data = {"train": [1, 2, 3], "test": [4, 5]}
sample_split_file = os.path.join(split_path, 'dataset1__train.json')
with open(sample_split_file, 'w') as f:
    json.dump(sample_split_data, f)

# Define the arguments for get_split_path
ARGS = {
    'dataset_key': 'dataset1',
    'split_key': 'train'
}
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
list_of_dicts_to_dict_of_lists Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/custom/utils.py
code served (permissive licence) · get_code("72d8d5514149d7da")
How it ran

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

import torch
import numpy as np

# Construct a simple list of dictionaries
# The function expects a list where each element is a dict with the same keys
list_of_dict = [
    {"name": "alice", "age": 25, "score": 95.5},
    {"name": "bob", "age": 30, "score": 87.3},
    {"name": "charlie", "age": 28, "score": 92.1},
]

ARGS = {
    "list_of_dict": list_of_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
summarize_evaluation Ran
ran on a synthesized input
itsnamgyu/reasoning-teacher/src/evaluation/summary.py
code served (permissive licence) · get_code("3fea59ef4d0740f4")
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 pandas as pd
import numpy as np

# Create a small evaluation dataframe with the required columns
# The function accesses: correct, contains_answer, correct_format, complete
# Each should be a boolean or numeric column that supports .mean()

data = {
    'sample_index': [0, 1, 0, 1],
    'completion_index': [0, 0, 1, 1],
    'correct': [True, False, True, True],
    'contains_answer': [True, True, False, True],
    'correct_format': [True, True, True, False],
    'complete': [True, False, True, True]
}

evaluation_df = pd.DataFrame(data)

ARGS = {
    'evaluation': evaluation_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
get_token_count Not yet run
unverified (harvested, no recorded run)
itsnamgyu/reasoning-teacher/src/oai/utils/tokens.py
code served (permissive licence) · get_code("c715cc1e173d5091")
How it ran

no invocation recorded.

truncate_by_n_tokens Not yet run
unverified (harvested, no recorded run)
itsnamgyu/reasoning-teacher/src/oai/utils/tokens.py
code served (permissive licence) · get_code("faa49eca817c0635")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 7 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
get_dataset_path 1 other paper
1 later
2306.08553 (2023-06)
Noise Stability Optimization for Finding Flat Minima: A Hessian-based Regularization Approach
get_split_path 1 other paper
1 later
2306.08553 (2023-06)
Noise Stability Optimization for Finding Flat Minima: A Hessian-based Regularization Approach

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

Recent works have shown that chain-of-thought (CoT) prompting can elicit language models to solve complex reasoning tasks, step-by-step. However, prompt-based CoT methods are dependent on very large models such as GPT-3 175B which are prohibitive to deploy at scale. In this paper, we use these large models as reasoning teachers to enable complex reasoning in smaller models and reduce model size requirements by several orders of magnitude. We propose Fine-tune-CoT, a method that generates reasoning samples from very large teacher models to fine-tune smaller models. We evaluate our method on a wide range of public models and complex tasks. We find that Fine-tune-CoT enables substantial reasoning capability in small models, far outperforming prompt-based baselines and even the teacher model in many tasks. Additionally, we extend our method by leveraging the teacher model's ability to generate multiple distinct rationales for each original sample. Enriching the fine-tuning data with such diverse reasoning results in a substantial performance boost across datasets, even for very small models. We conduct ablations and sample studies to understand the emergence of reasoning capabilities of student models. Our code implementation and data are available at https://github.com/itsnamgyu/reasoning-teacher.

For agents

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

get_harvested_code_for_paper("2212.10071")
get_code_for_paper("2212.10071")
have("2212.10071")

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

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

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

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

Connect an agent — have() is free.