SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2511.13223 · NeurIPS · 2025

TokenSqueeze: Performance-Preserving Compression for Reasoning LLMs

Zhongming Jin, Deng Cai, Qiang Fu, Jieping Ye, Binbin Lin, Yuxiang Zhang, Zhengxu Yu, Weihang Pan

arXiv · PDF · Open in the Atlas

Code that ran

15 of 20 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; 4 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 8 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2511.13223.json · badge: /api/ran/2511.13223.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
zhangyx1122/TokenSqueeze canonical (classifier label)
classifier basis: census
15 ran · 5 no recorded run
FunctionStatusWhere it lives
choice_answer_clean Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/utils/qwen_verify.py
pointer only (licence: NONE); the stored copy get_code serves, from QwenLM/Qwen2.5-Math, is pointer only (licence: NONE) · get_code("809c0178a7ae90ff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

compute_score Ran
ran, honoured the contract we drafted
zhangyx1122/TokenSqueeze/utils/math500_verify.py
pointer only (licence: NONE) · get_code("054091f2e78d9eec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_answer Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/utils/tools.py
pointer only (licence: NONE) · get_code("4eed1f4a7be28b06")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_item_hash_number Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/step3_generate_rewrite_data.py
pointer only (licence: NONE) · get_code("645a0fc1825a551c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_kl_divergence Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/step4_cal_kl_for_rewrite_data.py
pointer only (licence: NONE) · get_code("bacdc9de18ac7371")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_ppl Ran
ran, honoured the contract we drafted
zhangyx1122/TokenSqueeze/utils/tools.py
pointer only (licence: NONE) · get_code("e4e817be08b2ac02")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_prob Ran
ran, honoured the contract we drafted
zhangyx1122/TokenSqueeze/step4_cal_kl_for_rewrite_data.py
pointer only (licence: NONE) · get_code("58ad512ca891a50b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_prob_kv Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/step4_cal_kl_for_rewrite_data.py
pointer only (licence: NONE) · get_code("97818df7f4fc45f5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

is_digit Ran
ran, violated the contract we drafted
zhangyx1122/TokenSqueeze/utils/qwen_verify.py
pointer only (licence: NONE); the stored copy get_code serves, from QwenLM/Qwen2.5-Math, is pointer only (licence: NONE) · get_code("fb37d3c84b18e368")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

is_equiv Ran
ran, violated the contract we drafted
zhangyx1122/TokenSqueeze/utils/math500_verify.py
pointer only (licence: NONE); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("e88118a107b326d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

normalize_final_answer Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/utils/orz_verify.py
pointer only (licence: NONE) · get_code("5662e5ee755b541c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

parse_digits Ran
ran, honoured the contract we drafted
zhangyx1122/TokenSqueeze/utils/qwen_verify.py
pointer only (licence: NONE); the stored copy get_code serves, from QwenLM/Qwen2.5-Math, is pointer only (licence: NONE) · get_code("7d4b7f8c3875b126")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

process_pair_longfalse Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/step2_fliter_dpo_datasets.py
pointer only (licence: NONE) · get_code("2f67c7621d2b63bf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

remove_boxed Ran
ran; our contract draft was wrong, not the code
zhangyx1122/TokenSqueeze/utils/math500_verify.py
pointer only (licence: NONE) · get_code("53a8a2e9d14cedfd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

repeatness Ran
ran, violated the contract we drafted
zhangyx1122/TokenSqueeze/utils/orz_verify.py
pointer only (licence: NONE) · get_code("3dcb40e5ce9bac48")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

get_model_and_tokenizer Not yet run
unverified (harvested, no recorded run)
zhangyx1122/TokenSqueeze/utils/tools.py
pointer only (licence: NONE) · get_code("914ae020e2d944f4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

latex_eval Not yet run
unverified (harvested, no recorded run)
zhangyx1122/TokenSqueeze/utils/orz_verify.py
pointer only (licence: NONE) · get_code("f326075fb5f40749")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

process_item Not yet run
unverified (harvested, no recorded run)
zhangyx1122/TokenSqueeze/step5_generate_rewrite_dpo_pair.py
pointer only (licence: NONE) · get_code("62c0b9272e324d3a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

timeout_call Not yet run
unverified (harvested, no recorded run)
zhangyx1122/TokenSqueeze/utils/merged_verify.py
pointer only (licence: NONE) · get_code("791da81670e617a4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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.

tokenize_length Not yet run
unverified (harvested, no recorded run)
zhangyx1122/TokenSqueeze/step5_generate_rewrite_dpo_pair.py
pointer only (licence: NONE) · get_code("952f974b7981a318")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhangyx1122/TokenSqueeze 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 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 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, 6 later) and 12 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
is_digit 18 other papers
13 dated earlier, 4 later, 1 undated
2405.14365 (2024-05)
JiuZhang3.0: Efficiently Improving Mathematical Reasoning by Training Small Data Synthesis Models
2410.07985 (2024-10)
Omni-MATH: A Universal Olympiad Level Mathematic Benchmark For Large Language Models
2502.06703 (2025-02)
Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling
and 15 more not named here
parse_digits 18 other papers
13 dated earlier, 4 later, 1 undated
2405.14365 (2024-05)
JiuZhang3.0: Efficiently Improving Mathematical Reasoning by Training Small Data Synthesis Models
2410.07985 (2024-10)
Omni-MATH: A Universal Olympiad Level Mathematic Benchmark For Large Language Models
2502.06703 (2025-02)
Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling
and 15 more not named here
choice_answer_clean 15 other papers
12 dated earlier, 2 later, 1 undated
2410.07985 (2024-10)
Omni-MATH: A Universal Olympiad Level Mathematic Benchmark For Large Language Models
2502.06703 (2025-02)
Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling
2502.06773 (2025-02)
On the Emergence of Thinking in LLMs I: Searching for the Right Intuition
and 12 more not named here
normalize_final_answer 9 other papers
2 dated earlier, 1 the same month, 6 later
2504.16084 (2025-04)
TTRL: Test-Time Reinforcement Learning
2509.24372 (2025-09)
Evolution Strategies at Scale: LLM Fine-Tuning Beyond Reinforcement Learning
2511.15694 (2025-11)
The Impact of Quantization on Large Reasoning Model Reinforcement Learning
and 6 more not named here
repeatness 8 other papers
1 dated earlier, 1 the same month, 6 later
2509.24372 (2025-09)
Evolution Strategies at Scale: LLM Fine-Tuning Beyond Reinforcement Learning
2511.15694 (2025-11)
The Impact of Quantization on Large Reasoning Model Reinforcement Learning
2601.22648 (2026-01)
UCPO: Uncertainty-Aware Policy Optimization
and 5 more not named here
is_equiv 4 other papers
1 dated earlier, 3 later
2505.14625 (2025-05)
TinyV: Reducing False Negatives in Verification Improves RL for LLM Reasoning
2602.06462 (2026-02)
Diffusion-State Policy Optimization for Masked Diffusion Language Models
2604.13552 (2026-04)
Training-Free Test-Time Contrastive Learning for Large Language Models
and 1 more not named here
compute_score 1 other paper
1 dated earlier
2505.14625 (2025-05)
TinyV: Reducing False Negatives in Verification Improves RL for LLM Reasoning
remove_boxed 1 other paper
1 dated earlier
2505.14625 (2025-05)
TinyV: Reducing False Negatives in Verification Improves RL for LLM Reasoning

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

Emerging reasoning LLMs such as OpenAI-o1 and DeepSeek-R1 have achieved strong performance on complex reasoning tasks by generating long chain-ofthought (CoT) traces. However, these long CoTs result in increased token usage, leading to higher inference latency and memory consumption. As a result, balancing accuracy and reasoning efficiency has become essential for deploying reasoning LLMs in practical applications. Existing long-to-short (Long2Short) methods aim to reduce inference length but often sacrifice accuracy, revealing a need for an approach that maintains performance while lowering token costs. To address this efficiency-accuracy tradeoff, we propose TokenSqueeze, a novel Long2Short method that condenses reasoning paths while preserving performance and relying exclusively on self-generated data. First, to prevent performance degradation caused by excessive compression of reasoning depth, we propose to select self-generated samples whose reasoning depth is adaptively matched to the complexity of the problem. To further optimize the linguistic expression without altering the underlying reasoning paths, we introduce a distribution-aligned linguistic refinement method that enhances the clarity and conciseness of the reasoning path while preserving its logical integrity. Comprehensive experimental results demonstrated the effectiveness of TokenSqueeze in reducing token usage while maintaining accuracy. Notably, DeepSeek-R1-Distill-Qwen-7B fine-tuned by using our proposed method achieved a 50% average token reduction while preserving accuracy on the MATH500 benchmark. TokenSqueeze exclusively utilizes the model's self-generated data, enabling efficient and high-fidelity reasoning without relying on manually curated short-answer datasets across diverse applications. Our code is available at https://github.com/zhangyx1122/TokenSqueeze.

For agents

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

get_harvested_code_for_paper("2511.13223")
get_code_for_paper("2511.13223")
have("2511.13223")

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

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

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

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

Connect an agent — have() is free.