CodecLM: Aligning Language Models with Tailored Synthetic Data

Zifeng Wang,Chun-Liang Li,Vincent Perot,Long T. Le,Jin Miao,Zizhao Zhang,Chen-Yu Lee,Tomas Pfister
2024-04-09
Abstract:Instruction tuning has emerged as the key in aligning large language models (LLMs) with specific task instructions, thereby mitigating the discrepancy between the next-token prediction objective and users' actual goals. To reduce the labor and time cost to collect or annotate data by humans, researchers start to explore the use of LLMs to generate instruction-aligned synthetic data. Recent works focus on generating diverse instructions and applying LLM to increase instruction complexity, often neglecting downstream use cases. It remains unclear how to tailor high-quality data to elicit better instruction-following abilities in different target instruction distributions and LLMs. To this end, we introduce CodecLM, a general framework for adaptively generating high-quality synthetic data for LLM alignment with different downstream instruction distributions and LLMs. Drawing on the Encode-Decode principles, we use LLMs as codecs to guide the data generation process. We first encode seed instructions into metadata, which are concise keywords generated on-the-fly to capture the target instruction distribution, and then decode metadata to create tailored instructions. We also introduce Self-Rubrics and Contrastive Filtering during decoding to tailor data-efficient samples. Extensive experiments on four open-domain instruction following benchmarks validate the effectiveness of CodecLM over the current state-of-the-arts.
Computation and Language,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
The problem tackled by this paper is how to better align large language models (LLMs), especially for specific downstream tasks. Existing methods rely on either manually annotated data or data generated by LLMs, but lack effective customization for the instruction distribution of different tasks. CodecLM provides a framework that aligns LLMs with different task instructions by adaptively generating high-quality synthetic data. It uses LLMs as encoders and decoders, encoding seed instructions into metadata and then decoding to generate customized instructions. Additionally, self-assessment and contrastive filtering techniques are introduced to optimize the quality of the instructions. This approach aims to improve the performance of LLMs in various instruction-following tasks.