Distilling Instruction-following Abilities of Large Language Models with Task-aware Curriculum Planning

Yuanhao Yue, Chengyu Wang, Jun Huang, Peng Wang

Introduction

Instruction tuning is essential for aligning Large Language Models (LLMs) with human preferences. However, traditional distillation methods often rely on static, "one-size-fits-all" datasets that fail to account for the specific learning needs of smaller "student" models. This often results in imbalanced capabilities, where models are conversational but lack depth in complex reasoning or coding tasks.

To address these challenges, we present TAPIR (Task-Aware Curriculum Planning for Instruction Refinement). TAPIR is a dynamic distillation framework that identifies "hard" instructions for a specific student model and progressively increases task difficulty through a multi-round curriculum. This approach allows a 7B-parameter model to punch well above its weight class, outperforming much larger 13B-parameter models on major benchmarks.

The TAPIR Framework

TAPIR moves away from static distillation toward a student-centered, iterative learning process. The framework consists of several key innovations:

Model Fitting Difficulty (MFD)

Rather than assuming all teacher-generated data is equally useful, TAPIR introduces the Model Fitting Difficulty (MFD) metric. A "Judge LLM" (such as GPT-4) evaluates the gap between a teacher's response and the student's current response. A wider gap indicates a "hard" instruction for that specific student, signaling a high-priority area for learning.

Task-Aware Re-balancing and Refinement

Standard datasets often lack sufficient representation of complex tasks. TAPIR classifies instructions into 33 distinct categories and intentionally over-samples "critical" domains like mathematics, logical reasoning, and coding. Furthermore, the teacher model is used to refine instructions—making them more detailed—and to generate "Enhanced Responses" using Chain-of-Thought (CoT) reasoning to provide richer learning signals.

Multi-round Curriculum Planning (MCP)

The "secret sauce" of TAPIR is its multi-round training strategy. Instead of a single training burst, the model evolves through multiple iterations. In early rounds, the student is exposed to a mix of easy and hard tasks. As training progresses, the proportion of "hard" samples is systematically increased, mirroring human curriculum learning and preventing the "catastrophic forgetting" of basic tasks.

Overview of the TAPIR framework, illustrating the iterative distillation process including student-teacher interaction, task distribution re-sampling, and multi-round curriculum planning.

Experimental Setup

The framework was evaluated using the following resources:

  • Training Data: Initialized with the Alpaca dataset (52K instructions) and a 70K subset of OpenHermes 2.5.
  • Benchmarks: Performance was measured using AlpacaEval 2.0 (win rate against GPT-4), MT-Bench (multi-turn conversation and reasoning), and the Open LLM Leaderboard (ARC, HellaSwag, MMLU, TruthfulQA) to ensure general knowledge retention.

Key Results

The results demonstrate that strategic data selection and curriculum planning are more effective than simply increasing data volume.

  • Efficiency and Performance: TAPIR-7B-M, trained on only 70K samples, achieved a 7.80% win rate on AlpacaEval 2.0. This surpasses LLaMA2-Chat 13B (7.70%), which was trained on a significantly larger dataset and utilized Reinforcement Learning from Human Feedback (RLHF).
  • Superior Reasoning: On MT-Bench, TAPIR-7B-M scored 6.74, outperforming the standard LLaMA2-Chat 7B (6.41) and rivaling several 13B-parameter models.
  • Scalability: Testing across the Qwen1.5 series (1.8B to 14B parameters) confirmed consistent performance gains, proving the framework's versatility across different model scales.
Performance comparison of TAPIR-7B-M against other models on AlpacaEval 2.0 and MT-Bench, showing it outperforming larger models like LLaMA2-Chat 13B.

Discussion and Future Work

TAPIR highlights the importance of the "Student-in-the-Loop" advantage. By tailoring distillation to what the student actually struggles with, we achieve higher efficiency. Furthermore, the emphasis on reasoning tasks acts as a "growth hormone" for LLMs, helping them internalize underlying logic rather than just memorizing patterns.

Despite its success, TAPIR relies on powerful proprietary "Oracle" LLMs for scoring and refinement, which can be costly. Future work will explore more task-specific synthesis techniques and investigate whether the benefits of curriculum planning scale indefinitely for even larger student models.

Summary updated

BibTeX
@inproceedings{yue2024distilling,
  author = {Yuanhao Yue and Chengyu Wang and Jun Huang and Peng Wang},
  title = {{Distilling Instruction-following Abilities of Large Language Models with Task-aware Curriculum Planning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.350},
}
Figure