Abstract
Instruction tuning is critical for transforming base large language models (LLMs) into capable assistants. However, current methods rely heavily on expensive human annotation or distillation from proprietary "Goliath" models like GPT-4, which poses legal and financial risks. This paper introduces a novel framework that enables open-source "David" models to generate high-quality instruction data independently. By reversing the instruction-generation process and employing a perplexity-based filtering strategy, the proposed method produces datasets that outperform established benchmarks like Alpaca. Our results demonstrate that open-source models can achieve over 70% relative quality compared to ChatGPT without violating closed-source terms of service.
Introduction
The rapid advancement of LLMs has highlighted the importance of instruction tuning. While raw models possess vast knowledge, they require fine-tuning on instruction-output pairs to become helpful agents. Traditionally, this data is sourced via human experts (high cost, low scalability) or by distilling outputs from closed-source models (legal risks, high API costs). This "Goliath" problem restricts the open-source community's ability to innovate freely. This research explores a path toward self-sufficiency by leveraging open-source models to generate their own training data.
Methodology
The authors propose a multi-stage pipeline designed to maximize the utility of smaller, open-source models like LLaMA-7B. This framework shifts the burden of data creation away from proprietary APIs and toward a self-improving open-source cycle.
- Instruction Generation Model Training: The process begins by training a model to perform "reverse instruction generation"—predicting a likely instruction given a target text.
- Instruction Data Generation: Using unsupervised corpora like Wikipedia and C4, the model generates multiple candidate instructions for various text fragments.
- Instruction Data Filtering: To mitigate noise, a perplexity-based (PPL) filtering strategy is used. An instruction-following model evaluates the likelihood of the output given each candidate instruction; the pair with the lowest perplexity is retained.
- Instruction Following Model Training: The final filtered dataset is used to fine-tune the target open-source model.
Key Results
The framework was evaluated against the SUPERNI and LongForm benchmarks. A key finding was the effectiveness of the "Extract-then-Generate" strategy, which identifies concise, high-value fragments from long-form text to serve as answers. This ensures that the resulting instruction-following pairs are neither too long nor too trivial.
As shown in the evaluation, the resulting model achieved a relative quality score of 70.94% compared to ChatGPT, surpassing the performance of Alpaca-7B (69.29%), which relies on OpenAI's text-davinci-003. This confirms that high-quality filtering and strategic data extraction can compensate for the lower raw "brainpower" of open-source generators.
Discussion and Conclusion
This work proves that the open-source community can bypass the "Goliath" models for instruction tuning. By focusing on data quality through perplexity filtering rather than just scale, "David" models can hold their own. However, challenges remain regarding factual hallucinations inherited from base models and the difficulty of generating complex reasoning tasks for specialized domains like advanced mathematics. Future research will focus on scaling this approach to multi-step reasoning and broader linguistic coverage, further empowering the open-source ecosystem.
Summary updated