From Compressed Bubbles to Full Chain-of-Thought: A Practical Path for Reasoning Model Distillation

    Traditional distillation of large language models often fails because commercial closed-source models only expose highly compressed reasoning summaries, omitting the step-by-step derivation process. This article explores a practical approach to overcome this bottleneck using Trace Inversion. By training a small "reverse decoder" to reconstruct a full chain-of-thought (CoT) from compressed outputs and applying a three-stage curriculum learning strategy, developers can effectively distill reasoning-enhanced capabilities into small and medium-sized models. The article also covers data quality control, engineering practices, and the limitations of this experimental methodology.

    1. Problem Background: Why Traditional Distillation Often Fails

    The classic approach to large model distillation involves fine-tuning a smaller student model using input-output pairs from a teacher model. However, in practice, a common issue quickly becomes apparent: mainstream commercial closed-source models often only expose a highly compressed “reasoning summary” (the so-called reasoning bubble) in their outputs. The actual step-by-step derivation process occurs on the server side but is not fully returned to the caller.

    This leads to a fundamental contradiction:

    • The teacher’s conclusions “skip steps,” omitting intermediate verification, backtracking, and branch attempts.
    • The student model forced to learn these jump-step conclusions only learns superficial pattern matching, lacking underlying derivation logic.
    • When encountering problems outside the training distribution, the model’s generalization ability collapses rapidly, breaking the reasoning chain.

    In other words, the bottleneck of distillation is often not compute power, but the insufficient “reasoning density” of the training data. The community has explored several experimental solutions around this issue. One representative approach is: since the complete CoT is unavailable, train a dedicated model to “reverse-engineer” the compressed conclusions back into complete, step-by-step thinking. Below, we break down this method using a typical open-source experimental scheme as a blueprint.

    2. Core Innovation: Trace Inversion

    2.1 Basic Concept

    The idea can be summarized in one sentence: train a small “reverse decoder” that takes the compressed reasoning bubble output by the teacher model as input and outputs a complete CoT with intermediate steps filled in.

    The data pipeline looks roughly like this:

    1. Teacher Model Output (Compressed bubble, jump-step conclusions)
    2. ↓
    3. Reverse Decoder (A small model with ~4B parameters)
    4. ↓
    5. Complete step-by-step learnable CoT
    6. ↓
    7. Reassembled with original prompt/response into SFT samples

    The reverse decoder itself is an instruction-tuned medium-sized model. The task is explicitly defined as “reasoning chain completion”: given a problem, the final answer, and the compressed reasoning summary, reconstruct a logically coherent and step-wise derivation process. Creators typically first construct a batch of synthetic pairs of “complete chain -> compressed bubble,” use supervised learning to teach the decoder the inverse operation of compression, and then batch process real data.

    2.2 Data Quality Control

    The quality of the inverted CoT directly determines the downstream fine-tuning effect. Several common filtering methods are worth noting:

    1. Consistency Check: The completed CoT is re-reasoned, and the final answer must match the original response; otherwise, it is discarded.
    2. Logical Step Constraint: Set a lower limit on the minimum number of steps per sample to filter out “rephrased jump-steps.”
    3. Deduplication and Difficulty Stratification: Tag and stratified sample by task type (math, logic, multi-turn dialogue) to prevent data distribution skew.

    Following this process, experiments typically yield thousands to tens of thousands of high-quality reasoning traces, forming two typical datasets: one for general step-by-step reasoning and one for complex multi-turn logic and math tasks.

    3. Three-Stage Curriculum Learning: Gradually Maximizing Context and Difficulty

    With data in place, the training strategy is equally critical. Directly using long-context, high-difficulty samples for SFT easily causes small and medium models to collapse. A proven effective approach is a three-stage curriculum training:

    Phase 1: Format Foundation (Sequence length < 4096 tokens)
    Use short samples to stabilize the CoT tag format and output structure. The goal is to strictly converge the model’s output format, preparing for subsequent reinforcement learning integration. Format chaos is the most common failure cause in downstream RL training.

    Phase 2: Complexity Expansion (4096 - 8192 tokens)
    Introduce medium-complexity reasoning tasks, allowing the model to maintain logical coherence over longer ranges and handle problems requiring multi-step derivation.

    Phase 3: Long Context SFT (8192 - 32K tokens)
    Gradually lengthen the context while mixing in about 10% short samples as “replay” to prevent the model from forgetting short-task capabilities during long-text training. This experience replay is a classic curriculum learning technique that is low-cost but highly effective.

    The essence of this process is: complexity and context length ramp up synchronously, expanding the capability boundary near the stable solution of the previous step.

    4. Model Capability Design and Engineering Key Points

    Taking a 27B Dense reasoning model produced by such schemes as an example, it typically features the following design:

    • Native Long Context Support: Training covers 32K, extendable to longer windows via interpolation.
    • Multimodal and Tool Calling: Supports visual input via attached projection modules and natively supports function calling formats.
    • Strict Tag Format Convergence: The CoT is wrapped in fixed tags for easy parsing and decoupling during the RL phase.
    • Cross-Source Data Alignment: Mixes distillation data from multiple teacher sources to mitigate capability bias from a single teacher.

    Regarding the training framework, the community commonly uses memory-efficient fine-tuning solutions (such as Unsloth-style acceleration libraries). Combined with LoRA, consumer-grade GPUs or even free compute platforms can complete the full fine-tuning of 9B-level models. This significantly lowers the barrier to entry for individual developers and small teams.

    5. Limitations and Precautions

    It must be emphasized that these community experimental releases generally have clear limitations, which must be understood before use:

    1. No Complete Safety Evaluation: Inverted data may amplify unsafe outputs from the teacher model; production environments require self-conducted red team testing.
    2. No Full Benchmarking: Capability conclusions mostly come from small-scale evaluations and cannot be equated with authoritative results.
    3. No Guarantee of Inverted Chain Correctness: A “complete-looking” CoT does not mean “logically correct”; manual spot-checking is recommended.
    4. Compliance Risks: Using closed-source model outputs for distillation requires verifying compliance with the corresponding Terms of Service.

    6. Conclusion

    This combination of “trace inversion + curriculum SFT” provides a pragmatic path to bypass the bottleneck of “unavailable complete CoT”: using a small model for the inverse operation of compression, using curriculum learning to control training stability, and ultimately enabling small and medium-parameter models to achieve usable reasoning-enhanced capabilities on consumer-grade resources. For developers, the methodology within—data consistency checks, three-stage ramp-up, experience replay, and format convergence—holds more long-term reuse value than specific datasets and can be entirely transferred to their own distillation projects.