Training Task Experts through Retrieval Based Distillation
Jiaxin Ge, Xueying Jia, Vijay Viswanathan, Hongyin Luo, Graham Neubig
TL;DR
This paper introduces Retrieval Based Distillation (ReBase), a framework that overcomes data scarcity for domain-specific model fine-tuning by retrieving diverse labeled data from a large pool of online datasets and transforming it with an LLM to produce task-specific (query, answer) data, including Chain-of-Thought reasoning for complex tasks. The method builds a large, column-wise datastore from Hugging Face Datasets, retrieves highly relevant items via instruction and example-guided cosine similarity scoring, and then transforms the retrieved data into usable training data for a task-expert model. Across MNLI, SQuAD, MCoNaLa, and BBH, ReBase achieves notable improvements over baselines such as data synthesis and zero-shot generation, demonstrating enhanced data diversity, coverage, and reasoning ability in the downstream model. The work highlights the practical impact of combining multisource retrieval with structured data transformation to enable cost-effective training of domain-specific models and provides insights into data diversity, CoT distillation, and the tradeoffs of different generation architectures.
Abstract
One of the most reliable ways to create deployable models for specialized tasks is to obtain an adequate amount of high-quality task-specific data. However, for specialized tasks, often such datasets do not exist. Existing methods address this by creating such data from large language models (LLMs) and then distilling such knowledge into smaller models. However, these methods are limited by the quality of the LLMs output, and tend to generate repetitive or incorrect data. In this work, we present Retrieval Based Distillation (ReBase), a method that first retrieves data from rich online sources and then transforms them into domain-specific data. This method greatly enhances data diversity. Moreover, ReBase generates Chain-of-Thought reasoning and distills the reasoning capacity of LLMs. We test our method on 4 benchmarks and results show that our method significantly improves performance by up to 7.8% on SQuAD, 1.37% on MNLI, and 1.94% on BigBench-Hard.
