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

Yuanhao Yue, Chengyu Wang, Jun Huang, Peng Wang · DOI

Introduction

To enhance the utility of smaller, open-source Large Language Models (LLMs), researchers frequently employ "distillation" techniques, where knowledge is transferred from powerful proprietary models like GPT-4. This process typically involves generating thousands of instruction-response pairs from the "teacher" model to fine-tune a smaller "student" model. However, standard distillation often suffers from a skewed distribution of tasks and fails to account for the varying difficulty of instructions, leading models to learn simple shortcuts rather than robust reasoning capabilities.

The TAPIR Framework

The authors introduce TAPIR (Task-Aware Curriculum Planning for Instruction Refinement), a multi-round distillation framework designed to move beyond simple data dumping. TAPIR treats the training process like a carefully planned school curriculum, dynamically selecting difficult instructions and balancing task types to ensure the student model develops well-rounded abilities.

The TAPIR framework overview, illustrating the multi-round distillation process.

Methodology

TAPIR utilizes three primary techniques to optimize the distillation process:

  1. Model Fitting Difficulty (MFD): Rather than assuming which data is difficult, TAPIR measures it. It uses a "Judge LLM" to compare the student's response against the teacher's. Instructions where the student significantly underperforms are flagged as high-difficulty and prioritized for future training rounds.
  2. Task-Aware Instruction Distillation: Using a classifier to categorize instructions into 33 types, the framework intentionally over-samples complex domains like math, logic, and coding. Furthermore, the teacher model is prompted to rewrite answers to include step-by-step reasoning, ensuring the student learns the underlying logic.
  3. Multi-round Curriculum Planning (MCP): TAPIR implements a progressive learning schedule. It begins with a balanced mix of tasks and systematically increases the proportion of difficult instructions in each subsequent round, preventing the model from being overwhelmed while ensuring it masters complex skills.

Key Results

The TAPIR framework demonstrates that the quality and order of training data are more important than sheer volume. By using a highly curated 70K dataset, the LLaMA2-based TAPIR-7B-M model achieved a 7.80% win rate on AlpacaEval 2.0, surpassing the larger LLaMA2-Chat 13B (7.70%) and Vicuna 13B (6.72%).

Performance comparison of TAPIR models against established baselines.

On the MT-Bench benchmark, TAPIR-7B-M scored 6.74, outperforming strong 7B baselines such as sRecycled WizardLM (6.50) and Lion 7B (6.17). The model showed significant improvements in specialized sub-tasks like reasoning and coding. Importantly, this curriculum-based approach did not lead to "catastrophic forgetting"; the models maintained high performance on standard knowledge benchmarks like MMLU and ARC.

Conclusion

TAPIR proves that personalized, curriculum-based learning is highly effective for LLM distillation. By focusing on the specific weaknesses of the student model and gradually increasing task difficulty, TAPIR allows 7B-parameter models to punch well above their weight class. Future work may involve adapting this pipeline to even stronger teacher models and more advanced task-specific synthesis techniques to further bridge the gap between open-source and proprietary LLMs.

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