SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.12067 · EMNLP · 2025

TokenSkip: Controllable Chain-of-Thought Compression in LLMs

Wenjie Li, Li, Heming Xia, Yongqi Wang, Tou Chak, Wenjie Leong

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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 5 have no contract verdict; 6 failures of our instrument; 1 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/2502.12067.json · badge: /api/ran/2502.12067.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
hemingkx/TokenSkip canonical (classifier label)
classifier basis not recorded on the link
11 ran · 1 no recorded run
FunctionStatusWhere it lives
extract_boxed_answers Ran
ran; our contract draft was wrong, not the code
hemingkx/TokenSkip/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
hemingkx/TokenSkip/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
hemingkx/TokenSkip/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 on a synthesized input
hemingkx/TokenSkip/eval/utils.py
code served (permissive licence) · get_code("14ec4b04b4360475")
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 StoppingCriteria, GenerationConfig

torch.manual_seed(0)

class StandInTokenizer:
    def __init__(self):
        self.eos_token_id = 2
        self.pad_token_id = 0
        self.vocab_size = 100
    
    def __call__(self, texts, padding=None, return_tensors=None, add_special_tokens=False):
        # Return a mock tokenized output
        batch_size = len(texts) if isinstance(texts, list) else 1
        seq_len = 5
        input_ids = torch.randint(1, 50, (batch_size, seq_len))
        attention_mask = torch.ones((batch_size, seq_len))
        
        class TokenizedOutput:
            pass
        
        result = TokenizedOutput()
        result.input_ids = input_ids
        result.attention_mask = attention_mask
        return result
    
    def decode(self, token_ids, skip_special_tokens=False):
        if isinstance(token_ids, int):
            return f"token_{token_ids}"
        # Handle list or tensor
        if torch.is_tensor(token_ids):
            token_ids = token_ids.tolist()
        return " ".join([f"token_{tid}" for tid in token_ids])
    
    def batch_decode(self, token_ids, skip_special_tokens=False):
        if torch.is_tensor(token_ids):
            token_ids = token_ids.tolist()
        return [" ".join([f"token_{tid}" for tid in seq]) for seq in token_ids]


class StandInModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
        self.device_obj = type('obj', (object,), {'type': 'cpu'})()
    
    @property
    def device(self):
        return self.device_obj
    
    def generate(self, input_ids, attention_mask=None, stopping_criteria=None, pad_token_id=None, **kwargs):
        batch_size = input_ids.shape[0]
        prompt_len = input_ids.shape[1]
        # Generate some output tokens
        output_len = prompt_len + 3
        output_ids = torch.randint(1, 50, (batch_size, output_len))
        return output_ids


tokenizer = StandInTokenizer()
model = StandInModel()

prompts = ["Hello world", "How are you"]

ARGS = {
    "model": model,
    "tokenizer": tokenizer,
    "prompts": prompts,
    "batch_size": 2,
    "stop_id_sequences": [[2, 3], [4, 5]],
    "end_of_generation_id_sequence": [2],
    "disable_tqdm": True,
    "num_return_sequences": 1,
    "max_new_tokens": 10,
}
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
hemingkx/TokenSkip/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
load_all_data Ran
ran on a synthesized input
hemingkx/TokenSkip/get_llamafactory_input.py
code served (permissive licence) · get_code("1f5ed2063eb79f0c")
How it ran

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

import os
import json
import tempfile
import shutil

# Create a temporary directory structure with mock JSONL files
temp_dir = tempfile.mkdtemp()

# Create subdirectories
original_dir = os.path.join(temp_dir, 'Original', 'train', 'samples')
compression_dir = os.path.join(temp_dir, 'Compression')
os.makedirs(original_dir, exist_ok=True)
os.makedirs(compression_dir, exist_ok=True)

# Create mock JSONL files with sample data
sample_record = {"id": 1, "question": "What is 2+2?", "answer": "4"}

# Original data file
with open(os.path.join(original_dir, 'predictions_formatted.jsonl'), 'w') as f:
    f.write(json.dumps(sample_record) + '\n')
    f.write(json.dumps({"id": 2, "question": "What is 3+3?", "answer": "6"}) + '\n')

# Compressed data files with different ratios
for ratio in ['0.9', '0.8', '0.7', '0.6', '0.5']:
    with open(os.path.join(compression_dir, f'train_outputs_compressed_ratio_{ratio}.jsonl'), 'w') as f:
        f.write(json.dumps(sample_record) + '\n')
        f.write(json.dumps({"id": 2, "question": "compressed", "answer": "data"}) + '\n')

ARGS = {
    'input_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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_json Ran
ran on a synthesized input
hemingkx/TokenSkip/get_llamafactory_input.py
code served (permissive licence) · get_code("57518f0194aae8fb")
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 tempfile
import json
import os

# Create a temporary JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write some test JSON lines
test_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "name": "test", "value": 42}
]

with open(temp_file, 'w', encoding='utf-8') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    'file': temp_file,
    'encoding': 'utf-8'
}
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
load_jsonl Ran
ran on a synthesized input
hemingkx/TokenSkip/LLMLingua.py
code served (permissive licence) · get_code("3dc03e3fd9c53b25")
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 JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write some test JSONL data
test_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "text": "test data"}
]

with open(temp_file, 'w', encoding='utf-8') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    'file': temp_file,
    'encoding': 'utf-8'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_question Ran
ran; our contract draft was wrong, not the code
hemingkx/TokenSkip/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_data Ran
ran; our contract draft was wrong, not the code
hemingkx/TokenSkip/evaluation.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
strip_string Ran
ran; our contract draft was wrong, not the code
hemingkx/TokenSkip/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)
hemingkx/TokenSkip/eval/utils.py
code served (permissive licence) · get_code("8c63844c66973f8d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 2 the same month, 8 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
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
extract_program 5 other papers
3 dated earlier, 2 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
2 dated earlier, 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 2 more not named here
get_next_word_predictions 3 other papers
2 dated earlier, 1 later
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
2506.20512 (2025-06)
OctoThinker: Mid-training Incentivizes Reinforcement Learning Scaling
read_data 3 other papers
1 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
2025.acl-long.1506 (2025 (year only))
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
2506.20512 (2025-06)
OctoThinker: Mid-training Incentivizes Reinforcement Learning Scaling
parse_question 2 other papers
1 dated earlier, 1 later
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2506.20512 (2025-06)
OctoThinker: Mid-training Incentivizes Reinforcement Learning Scaling
score_completions 2 other papers
1 dated earlier, 1 later
2406.18629 (2024-06)
Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs
2506.20512 (2025-06)
OctoThinker: Mid-training Incentivizes Reinforcement Learning Scaling

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

Chain-of-Thought (CoT) has been proven effective in enhancing the reasoning capabilities of large language models (LLMs). Recent advancements, such as OpenAI's o1 and DeepSeek-R1, suggest that scaling up the length of CoT sequences during inference could further boost LLM reasoning performance. However, due to the autoregressive nature of LLM decoding, longer CoT outputs lead to a linear increase in inference latency, adversely affecting user experience, particularly when the CoT exceeds 10,000 tokens. To address this limitation, we analyze the semantic importance of tokens within CoT outputs and reveal that their contributions to reasoning vary. Building on this insight, we propose TokenSkip, a simple yet effective approach that enables LLMs to selectively skip less important tokens, allowing for controllable CoT compression. Extensive experiments across various models and tasks demonstrate the effectiveness of TokenSkip in reducing CoT token usage while preserving strong reasoning performance. Notably, when applied to Qwen2.5-14B-Instruct, TokenSkip reduces reasoning tokens by 40% (from 313 to 181) on GSM8K, with less than a 0.4% performance drop. We release our code and checkpoints in https: //github.com/hemingkx/TokenSkip.

For agents

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

get_harvested_code_for_paper("2502.12067")
get_code_for_paper("2502.12067")
have("2502.12067")

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

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

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

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

Connect an agent — have() is free.