Chain-of-thought prompting significantly improves the reasoning capabilities of large language models (LLMs) but incurs high inference costs due to lengthy autoregressive decoding. While previous efficiency approaches reduce costs by discarding tokens or utilizing continuous latent representations, these lossy methods fundamentally sacrifice interpretability and auditability. In this work, we introduce a novel compression framework for intermediate reasoning. We apply Byte-Pair Encoding (BPE) to reasoning corpora to learn a compressed vocabulary of Private Use Area (PUA) tokens, each representing frequent semantic spans. After expanding the LLM's vocabulary, we fine-tune the model via strictly 1:1, our method is lossless. We evaluate our approach on Llama-3.1-8B, Qwen2.5-14B, and Qwen2.5-32B across four diverse benchmarks. Our method reduces total generated tokens by 14.7% on average with reasoning trace lengths dropping by up to 27.1%, while incurring a negligible average accuracy cost of 1.6 percentage points. Crucially, this approach is orthogonal to existing lossy methods, allowing practitioners to stack lossless and irreversible compression techniques. We demonstrate that a compressed intermediate language provides a highly efficient computational resource that accelerates inference while fully preserving the transparency of LLM reasoning.
Figures & tables
Figure 1: Example of raw vs. compressed reasoning on a GSM8K problem. Concept tokens (e.g., [U+E103] = “she sold”) each replace 2 to 3 words or punctuation marks and can recur across a trace, while the numeric answer is left in plain text so the two versions are graded identically. Here compression reduces the full sequence from 71 to 54 tokens ( −24% ).
Model
Lang
GSM8K
CommonsenseQA
StrategyQA
MATH
acc. tok.
acc. tok.
acc. tok.
acc. tok.
Qwen-14B
EN
91.7% 227.5
82.3% 216.3
76.2% 209.4
69.2% 575.0
ZH
91.0% 195.5
75.8% 197.9
73.8% 165.8
62.8% 516.4
Qwen-32B
EN
90.8% 202.5
86.5% 158.8
79.4% 160.4
65.4% 445.1
ZH
93.5% 198.0
79.0% 222.4
75.0% 190.5
66.2% 454.8
Llama-8B
EN
82.0% 218.5
77.7% 141.0
68.8% 195.3
39.4% 724.1
Table 1: Baseline accuracy and mean generated tokens on raw English (EN) and Chinese (ZH) prompts.
Dataset
Train
Eval
Answer
Question Type
GSM8K
7,473
1,319
#\N
grade-school arithmetic word problems (multi-step numeric)
MATH
12,000
500
\boxed{}
competition math (algebra, geometry, number theory)
StrategyQA
1,443
160
yes/no
multi-hop yes/no needing implicit strategy
CommonsenseQA †
9,741
1,221
5-way choice
multiple-choice commonsense (answer-only, no CoT)
Table 2: Reasoning datasets used. GSM8K, MATH and StrategyQA carry genuine chain-of-thought and are used for the self-distillation fine-tune; each also has a parallel Chinese (ZH) eval set of identical size. † CommonsenseQA is answer-only, so it is dropped from the Stage-3 self-distill build and kept for raw-arm evaluation only.
Dataset
Model
Base
Comp.
Red.%
GSM8K
LLaMA-3.1-8B
1,160,879
943,294
18.74
Qwen2.5
1,338,791
1,121,890
16.20
CommonsenseQA
LLaMA-3.1-8B
230,115
197,000
14.39
Qwen2.5
230,229
197,389
14.26
StrategyQA
LLaMA-3.1-8B
73,941
66,042
10.68
Qwen2.5
76,515
68,637
10.30
Table 3: Per-dataset compression of the English training corpus under each model’s concept codec. base : base-tokenizer tokens; comp : compressed units; red.% =100(1−comp/base) . GSM8K compresses most; StrategyQA least.
Concept Tokens
LLaMA-3.1-8B
Qwen2.5
GSM8K
1,616
1,593
CommonsenseQA
857
841
StrategyQA
717
707
MATH
2,794
2,773
distinct EN
2,944
2,919
base vocab.
128,256
151,665
Table 4: English concept (PUA) tokens added to the vocabulary. The first four rows are the number of distinct concept tokens occurring in each dataset’s English corpus; these overlap across datasets, so they exceed the distinct EN total. MATH alone exercises ∼ 95% of the learned codec. “ext. vocab. (EN)” = base vocab. + distinct EN concepts.
Dataset
Key
Acc. (%)
Both Correct
Total (All Problems)
n
Gen
Total
Prompt
Gen.
Total
Gen. PUA%
Qwen2.5-14B-Instruct
GSM8K
Raw Compressed % token saved
90.2% 89.4%
1128
213.2 164.9 22.7%
374.9 306.1 18.3%
163.3 142.7 12.6%
221.4 172.1 22.3%
384.7 314.7 18.2%
0.0% 22.9%
MATH
Raw Compressed % token saved
67.8% 67.4%
311
444.4 373.5 16.0%
593.6 507.4 14.5%
166.2 149.3 10.2%
548.5 457.5 16.6%
714.6 606.8 15.1%
0.0% 13.1%
StrategyQA
Raw Compressed % token saved
78.7% 78.7%
120
187.1 158.9 15.1%
301.2 265.3 11.9%
114.4 106.7 6.7%
199.4 167.0 16.3%
313.8 273.7 12.8%
0.0% 13.6%
CommonsenseQA
Raw Compressed % token saved
82.5% 81.6%
937
228.2 176.9 22.4%
367.5 303.4 17.5%
139.5 126.5 9.3%
233.6 183.9 21.3%
373.1 310.4 16.8%
0.0% 12.7%
Table 5: Comparison across models: raw vs. compressed accuracy, the matched both-correct subset, and full totals across all problems. Each dataset is a single row; the key column repeats the stacking order used by every token-count cell ( raw on top, compressed in bold below, % tokens saved on the bottom line). Accuracy and genPUA% cells stack only raw/compressed, with no % line. Bold marks the better value in each pair: for accuracy, the higher percentage wins; for token counts, the lower count wins.