Abstract
Large language models (LLMs) with instruction fine-tuning demonstrate superior generative capabilities but are extremely resource-intensive. To alleviate this, we explore distilling knowledge from instruction-tuned LLMs into much smaller architectures. We developed a massive set of 2.58M instructions, designed for both scale and topic diversity using Wikipedia-guided generation. Analysis confirms the diversity of this dataset, which was used to generate responses via GPT-3.5-turbo. We then fine-tuned a "diverse herd" of models, LaMini-LM, spanning encoder-decoder and decoder-only families. Our results show that these models, despite being nearly 10 times smaller, remain competitive with much larger baselines across 15 NLP benchmarks and human assessments.
Introduction
While models like GPT-4 have redefined the state-of-the-art in NLP, their massive parameter counts create a "compute divide," limiting deployment to high-resource environments. Knowledge distillation—training a smaller "student" model to mimic a larger "teacher"—offers a solution. However, previous efforts often lacked the instruction scale and diversity needed for general-purpose performance.
We introduce LaMini-LM, a collection of efficient models (61M to 7B parameters) trained on a novel 2.58M-sample instruction dataset. By prioritizing diversity and exploring various architectures, we demonstrate that small models can punch significantly above their weight class.
Methodology: The LaMini Pipeline
Our approach centers on offline sequence distillation. Instead of matching internal probabilities, the student models learn to generate the same text responses as the teacher, gpt-3.5-turbo.
Large-Scale Instruction Generation
To build the LaMini-instruction dataset, we employed two primary strategies to ensure breadth and depth:
- Example-Guided Generation: Using seed tasks from existing datasets (Self-Instruct, P3, FLAN, Alpaca), we prompted the teacher to generate 20 similar but diverse instructions for each.
- Topic-Guided Generation: We extracted 3,500 categories from Wikipedia to guide the teacher in generating instructions across a vast knowledge graph, preventing the model from becoming overly specialized.
The Diverse Herd
We fine-tuned a wide array of architectures to identify the most efficient configurations at small scales:
- Encoder-Decoder: T5 and Flan-T5 (61M to 738M params).
- Decoder-Only: GPT-2, GPT-Neo, Cerebras-GPT, and LLaMA (111M to 7B params).
Key Insights and Results
Architecture Efficiency
A striking finding is that encoder-decoder models (specifically Flan-T5) significantly outperform decoder-only models at parameter counts below 500M. The LaMini-Flan-T5-248M model, for instance, performed on par with much larger decoder-only baselines, representing a nearly 10x improvement in parameter efficiency.
Performance vs. Scale
LaMini-LLaMA-7B achieved an average score of 65.7 across 15 benchmarks, significantly higher than the base LLaMA-7B (58.3) and Alpaca-7B (62.3). This suggests that high-quality, diverse synthetic data can be more effective than the original pre-training or smaller-scale instruction tuning used in previous models.
Human Evaluation
Human assessment of the generated instructions and responses confirms the high quality of the distilled data. As shown in Figure 6, the vast majority of samples across different subsets were rated as high quality (Rate-A), validating the robustness of the distillation process.
Hallucination Reduction
On our new LaMini-Hallucination benchmark—consisting of 40 "trick" questions—LaMini models showed marked improvement. While Alpaca-7B failed to reject almost any nonsense questions, LaMini-LLaMA-7B reduced the hallucination rate from 40/40 to 12/40.
Conclusion
LaMini-LM demonstrates that massive-scale, diverse instruction tuning is a viable path toward high-performance, accessible AI. By releasing our code, checkpoints, and the 2.58M-sample dataset, we hope to enable the development of more efficient "on-device" language models. While challenges remain in complex reasoning and multi-turn dialogue, the "diverse herd" proves that size isn't the only factor in intelligence.
Summary updated