From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuning
엔지니어링 플라스틱 · (23) 컴파운드
기본 정보
- 저자
- DOI
- 10.18653/v1/2024.naacl-long.421
- 저널
- –
- 발행년도
- 2024
- 발행기관
- –
- 피인용수
- 27
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.18653/v1/2024.naacl-long.421
- 토픽
- Advancements in Photolithography Techniques
- OpenAlex ID
- W4401042981
평가 내용
- 관련도
- 사업분야
- 엔지니어링 플라스틱 · (23) 컴파운드
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '엔지니어링 플라스틱 > 컴파운드' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 96,268자
본문 펼치기
섹션 본문 149문단 · 54,936자
(제목 없음)
1In the realm of Large Language Models (LLMs), the balance between instruction data quality and quantity is a focal point.Recognizing this, we introduce a self-guided methodology for LLMs to autonomously discern and select cherry samples from open-source datasets, effectively minimizing manual curation and potential cost for instruction tuning an LLM.Our key innovation, the Instruction-Following Difficulty (IFD) metric, emerges as a pivotal metric to identify discrepancies between a model's expected responses and its intrinsic generation capability.Through the application of IFD, cherry samples can be pinpointed, leading to a marked uptick in model training efficiency.Empirical validations on datasets like Alpaca and WizardLM underpin our findings; with a mere 10% of original data input, our strategy showcases improved results.This synthesis of self-guided cherry-picking and the IFD metric signifies a transformative leap in the instruction tuning of LLMs, promising both efficiency and resource-conscious advancements.Codes, data, and models are available. 1This work was done when Ming Li interned at Ping An Technology (Shenzhen) Co., Ltd., China.
Introduction
2Large Language Models (LLMs) have revolutionized the landscape of artificial intelligence (Touvron et al., 2023a,b;Penedo et al., 2023;Scao et al., 2022).Notable models such as GPT-3 (Brown et al., 2020) and GPT-4 (OpenAI, 2023) leverage extensive datasets and advanced training methodologies to exhibit high-level text understanding and generation capabilities (Liu et al., 2023(Liu et al., , 2024b;;Chen et al., 2023b;Sun et al., 2024;Liu et al., 2024a).Instruction tuning (Wei et al., 2022;Longpre et al., 2023) is a method employed to refine the performance of LLMs by providing specific guidelines or instructions during the model's training phase.It operates by supplying LLMs with explicit training instructions to produce the corresponding outputs that are more congruent with the desired ones (Xu et al., 2024).A well-formulated instruction or prompt provides essential contextual information, refining the model's capability to generate relevant and task-specific outputs (Taori et al., 2023;Ouyang et al., 2022).
3Previously, instruction tuning was regarded as relying on amassing vast datasets (Khashabi et al., 2020;Ye et al., 2021;Wei et al., 2022;Wang et al., 2022).However, a seminal revelation from the LIMA (Zhou et al., 2023) highlights the art of instruction tuning: rather than a sheer volume of data, it's the quality of the data that dictates the model's performance.LIMA's findings emphasize that even a limited amount of manually curated, high-quality data can elevate the model's instruction-following capability.While it underscores the significance of data quality, the question of how to automatically identify high-quality data from a vast ocean of available datasets remains under investigation.
4In our study, we introduce a novel approach for autonomously identifying the most impactful training samples, which we refer to as "cherry data", from extensive open-source datasets.These data samples are particularly effective in enhancing LLM instruction tuning.Central to our hypothesis is the idea that LLMs, through initial training with a small amount of instruction data, can inherently learn to discern and follow instructions, allowing them to estimate the difficulty of instruction data.
5Our method involves a self-guided process that begins with familiarizing the model with a small subset of the dataset during the "Learning from Brief Experience" phase.This phase lays the groundwork for the subsequent "Evaluating Based on Experience" phase, where we introduce the Instruction-Following Difficulty (IFD) score.This metric evaluates how much help the instruction provides to the generation of the corresponding response, by comparing the loss in model responses with and without instructional context.The higher IFD score, indicating less instructional help, suggests a greater difficulty with instructions.On the contrary, the lower IFD score represents that the given instruction can directly benefit the language model largely even without further training, representing the easiness and necessity of the instruction.Thus in the final "Retraining from Self-Guided Experience" phase, we use data with relatively large IFD scores as the cherry data to train our model, resulting in what we term "cherry models".This methodology, which emphasizes data quality over quantity, differs markedly from existing techniques that rely on external models for data curation.
6Extensive experimental results validate the efficacy of our method.By applying our methodology to the Alpaca and WizardLM instruction tuning datasets, our model outperforms the official Alpaca model with only approximately 5% data selected and outperforms the reimplemented WizardLM model with approximately 10% data selected.The key contributions of this paper:
7• We propose a self-guided approach enabling models to autonomously select the "cherry data" from vast open-source datasets.This innovation minimizes manual curation and optimizes the use of existing data resources, reducing costs and streamlining training.
8• We introduce the Instruction-Following Difficulty (IFD) score as a metric to measure how much help the instruction can provide to the generation of the corresponding response, revealing the model-specific difficulty of the given data sample.Using the IFD metric, we can pinpoint the data that is most helpful for a specific model.
9• Backed by validation on training datasets like Alpaca and WizardLM, our strategy demonstrates enhanced outcomes with only 10% of the original data input, emphasizing our approach's efficiency and transformative impact.
10• We provide a different model-specific view in measuring the difficulty of new instructions, which may benefit future instruction data generation work.
Methodology
11As illustrated in Figure 1, our methodology is divided into three core phases: Learning from Brief Experience, Evaluating Based on Experience, and Retraining from Self-Guided Experience.The initial phase emphasizes equipping the model with a basic instruction-following capability.The subsequent phase introduces a novel metric to evaluate the instruction-following difficulty score of each sample based on the previously trained preexperienced model.Finally, after obtaining difficulty scores in the target dataset, the cherry samples are selected to train our final model, which we call the cherry models.
Learning from Brief Experience
12This phase aims to equip the initial model with a basic instruction-following capability by forcing the model to first experience a subset of the target dataset.Specifically, for the initial full target dataset, D 0 contains n triplets x = (Instruction, [Input], Answer), we define the string Question = map(Instruction, [Input]) as the complete instruction.The map function is aligned with the original target dataset.Each word in Question(Q) and Answer(A) is denoted as x Q i and x A i respectively.Let LLM θ denote the LLM we use and θ represent the weight of LLMs, specifically, θ 0 represents the pre-trained base LLM model.Then the instruction embeddings for each sample x j are obtained by:
13where w Q j,i represents the i th word of Question strings of sample j and h Q j,i represents its corresponding last hidden states.
14To ensure the diversity of instructions exposed to the initial model, the basic clustering technique K-Means on these instruction embeddings is utilized.Motivated by LIMA's finding, we try to make this experience process as brief as possible by sampling only a few instances in each cluster which we call pre-experienced samples.Specifically, we generate 100 clusters on instruction embeddings and sample 10 instances in each cluster.Then the initial model is trained for only 1 epoch with these samples to obtain our brief pre-experienced model.
Evaluating Based on Experience
15In this stage, we introduce the Instruction-Following Difficulty (IFD) score, a metric devised to evaluate the difficulty each instructional sample presents.Our primary motivation, adhering to the goal of minimizing cross-entropy loss in model training, guides the use of this metric.It specifically targets gauging the impact of training data by isolating the instructional component's influence from that of the answer.To achieve this, we employ a method that compares the loss when the model generates responses both with and without the context provided by instruction.This comparison is crucial as it forms the basis of the IFD score, effectively quantifying the extent to which instruction aids in response generation.
16In the instruction-tuning process, the loss of a sample pair (Q, A) is calculated by continuously predicting the next tokens given the instruction Q and their proceeding words:
17where N is the number of words of the groundtruth answer A. We denote this averaged crossentropy loss as the Conditioned Answer Score s θ (A|Q) = L θ (A|Q).This metric evaluates the model's capability to generate appropriate responses based on provided instructions.It measures the extent to which the model's output aligns with both the instruction and the corresponding correct answer.However, a higher s θ (A|Q) does not mean a harder instruction to follow, it may be caused by the inherent characteristic of string A itself.In the pre-LLM era, when models are required to learn both the knowledge and instruction-following ability during finetuning, it is reasonable to use s θ (A|Q) as an indicator for the difficulty of a sample.However, things change a little for current LLMs, which have learned most of the knowledge in the pre-training phase and only need to learn to align and follow the instructions.Thus to estimate the difficulty of following instructions of a given sample, we introduce the Direct Answer Score s θ (A):
18(4) which measures LLM's ability to generate this answer alone.It gauges the inherent difficulty or challenge posed by the answer in isolation, without the contextual guidance from its corresponding instruction.A higher direct answer score may suggest that the answer is inherently more challenging or intricate for the model to generate.
19Further, analyzing the balance between a sample's inherent challenge and the model's capabilities in following it sheds light on the intricacies of estimating the difficulty of the instruction of a given sample.Specifically, we try to estimate the Instruction-Following Difficulty (IFD) scores IFD θ (Q, A) on following instruction of a given (Q, A) pairs by calculating the ratio between s θ (A) and s θ (A|Q):
20By utilizing this metric, the influence of LLM's intrinsic ability to fit the answer string is partially alleviated.The score measures the degree to which given instruction benefits the alignment of the corresponding response.High IFD scores infer the inability of the model to align responses to the given corresponding instructions, which in turn indicates the difficulty of an instruction.It is worth noting that this IFD θ (Q, A) is a model-specific value, and we use our pre-experienced model to obtain all these values in the target dataset.
21To further filter out the sample whose instruction is misaligned with its response, a threshold of 1 is set.Typically, the Conditioned Answer Score is always smaller than the Direct Answer Score due to the intrinsic nature of the next token prediction: With the context given, the prediction for the latter tokens should be easier.Thus if the IFD score is greater than 1, the Conditioned Answer Score is even larger than the Direct Answer Score, which means the given instruction provides no useful context for the prediction of the response.In this situa-tion, we think there exists a misalignment between the instruction and the corresponding response.
22Although our experiments reveal that learning from brief experiences is important, it makes the whole pipeline complicated and efficient.However, Superfiltering (Li et al., 2024b) expands the use of IFD scores and shows that (1) Good prompting can relieve the burden of training a pre-experienced model; (2) The IFD scores calculated by weak language models are consistent with strong models, making it possible to utilize small models for filtering, further pushing forward the efficiency of data filtering for instruction tuning.
233 Experimental Setup
Datasets
24Training Datasets The Alpaca dataset (Taori et al., 2023) encompasses 52002 instruction-following samples.Developed using the self-instruct (Wang et al., 2023b) approach with text-davinci-003.Though initially competitive, its dependence on text-davinci-003 posed data quality concerns.Wiz-ardLM dataset (Xu et al., 2023) leverages the Evol-Instruct algorithm to improve the quality of instruction data.The incorporation of ChatGPT during the reformulation guarantees high fidelity of data.We utilize the WizardLM70K for our experiment.Test Datasets To ensure comprehensive and unbiased assessment, we employed 5 diverse test sets: Vicuna (Chiang et al., 2023), Koala (Vu et al., 2023), WizardLM (Xu et al., 2023), Self-instruct (Wang et al., 2023b), and LIMA (Zhou et al., 2023).These test sets contain approximately 1000 human curated instructions, open-domain or closeddomain for different tasks from different sources.Among them, Vicuna and WizardLM further provide the specific sub-category for each instruction, making it possible for in-depth analysis.
Implementation Details
25For experiments on the LLaMA-7B pre-trained model, our training configuration aligns with the original Alpaca and WizardLM, by utilizing the the Alpaca codebase2 .For experiments on LLaMA2-7B and LLaMA2-13B models, we utilize the Vicuna codebase3 .The detailed training configuration can be found in Appendix A.
Pair-wise Comparison
26Evaluating the instruction-following capabilities of LLMs is challenging.Extensive research is still dedicated to creating automated evaluation metrics for LLMs (Chang et al., 2023) since human evaluation is both labor-intensive and potentially influenced by subjective biases.Leveraging the recent advancements in independent LLM evaluations (Zheng et al., 2023;Chiang et al., 2023;Li et al., 2023b), we utilize GPT4 and ChatGPT for comparative evaluations.Specifically, for each instruction in the test dataset, models that need to be compared are prompted to generate responses respectively.Then an API model, either GPT4 or ChatGPT, assigns scores for their responses.The model is regarded to be better in this dataset only if its answer is preferred by the judging model.
27In the evaluation, each model's response is rated by the judge on a scale from 1 to 10, reflecting attributes like relevance and accuracy.To further address the positional bias (Ko et al., 2020;Wang et al., 2023a), we send the responses of two models to the judge twice with different orders and compare their scores.Thus we define one model to be seen as winning only if it does not lose in both the ordering4 , specifically:
28• Wins: outperforms in both or wins in one and ties in the other.• Tie: ties in both or wins in one and loses in the other.• Loses: lags in both or ties in one and loses in the other.
Benchmarks
29The performances on two recently popular benchmarks for LLMs are also provided: Huggingface Open LLM Leaderboard and AlpacaEval Leaderboard.Huggingface Open LLM Leaderboard evaluates LLMs using (Gao et al., 2021), a unified framework to test generative language models on a large number of different evaluation tasks, on 4 key benchmarks including ARC (Clark et al., 2018), HellaSwag (Zellers et al., 2019), MMLU (Hendrycks et al., 2021) and TruthfulQA (Lin et al., 2022).AlpacaEval Leaderboard provides an LLMbased automatic evaluation based on AlpacaFarm (Dubois et al., 2023) evaluation set, in which the model responses are compared with responses of Davinci003 by GPT4.
30To better illustrate the efficacy of our method, further human evaluation is conducted.Specifically, we randomly sampled 20 instructions from each test set to generate a new random set containing 100 instructions in total.Then 3 human participants are asked to compare the responses generated by the models to be compared.For each comparison, 3 options are given (Win, Tie, and Loss) and the final results are determined by the majority voting of the participants.
Main Results
31In this section, we first present our primary pairwise evaluation results in Figure 2 A consistent observation across both datasets is that with merely 10% of selectively chosen data, our models manage to exceed the results of models trained on the full dataset.These findings not only highlight the efficiency of our data selection strategy but also underscore the potential of training powerful models with significantly reduced data requirements.By validating our approach on the renowned Alpaca dataset and the more intricate WizardLM dataset, the wide applicability and robustness of our proposed method are highlighted.
32The comparison between our cherry models with baseline models on Huggingface Open LLM Leaderboard and AlpacaEval Leaderboard are presented in Table 1 where we can see our cherry model using 5% Alpaca data outperforms the official Alpaca on both benchmarks, our cherry model using 10% WizardLM data has a close performance compared with our re-implemented WizardLM.These results further showcase the effectiveness of our automatically selected data.
33Moreover, the human evaluation results also showcase the usefulness of our method.When comparing the Cherry Alpaca (5%) and the Alpaca (100%), there are 49/100 wins for our cherry alpaca, 25/100 ties, and 26/100 losses.When comparing the Cherry WizardLM (10%) and the reimplemented WizardLM (100%), there are 37/100 wins for our Cherry WizardLM, 32/100 ties, and 31/100 losses.
Ablation on Data Selection Mechanism
34In this section, we perform ablation studies comparing our method with other data selection mechanisms.The results are presented in Figure 4, and the evaluation is based on ChatGPT as the judge on all 5 test datasets.Moreover, the ablation results on the Open LLM Leaderboard and human evaluation are in Appendix B.
Data Randomly Selected
35We train various LLaMA-7B models using randomly chosen data and compare their performance with the model trained with full data.As shown in Figure 4 (labeled as Random), models trained on 5%, 10%, or 15% random data consistently underperformed against the official Alpaca model.Notably, with an equivalent amount of data, our model surpasses the performance of models using randomly selected data, underlining our method's superiority.
Data with Diversity
36In this experiment, we train a series of models only considering the diversity of the data samples.Specifically, we utilize the K-means algorithm for the clustering, and then sample data from each cluster.It is a direct baseline for the situation where only the diversity of data is considered.As illustrated in Figure 4 (labeled as Diversity), these models render subpar performance and are similar to the random trained models.This result shows that filtering data by only diversity is not enough for instruction tuning.
Data with Low IFD Score
37In this experiment, we aim to further underscore the efficacy of our proposed IFD score.We train models using data chosen based on low IFD scores on the pre-experienced model, a direct antithesis to our primary experimental setting.As illustrated in Figure 4 (labeled as Low IFD score), models trained using low IFD scores obtain the least performance compared with all the methods.This observation highlights the prowess of our metric in sifting through high-quality data: a higher score consistently yields superior results, while a lower score deteriorates the model's intrinsic performance.This experiment directly showcases the consistent relationship between the performance and the IFD score values.
Data with High CA Scores
38For this comparison, we train models on data selected by higher Conditioned Answer scores which is equivalent to the loss or perplexity, and is a commonly accepted baseline.As Figure 4 (labeled as High CA score) elucidates, models in this group trail the official Alpaca model significantly.The salient difference between these models and ours rests on the elimination of Direct Answer scores.In models relying solely on CA scores, the underlying comprehension of the pre-trained LLM towards original answer texts isn't factored in, rendering high CA scores ineffective in gauging the intricate nuances of the instruction following.
Number of Pre-Experience Data
39Following the findings from LIMA that 1000 highquality samples are enough to train a reasonably good model, we set the amount of data used for our pre-experienced model as 1000.However, it is still under-investigated how many data samples are required to equip the model with basic instructionfollowing ability.Thus this section analyzes the necessity of employing pre-experience models and how the number of pre-experienced data affects the final performance of our cherry models.For these comparisons, we conduct the experiments where 0, 100, 300, and 500 pre-experienced samples are utilized to train the pre-experienced models.Using 0 pre-experienced samples represents direct using the initial raw model as the pre-experienced model.We calculate the IFD scores from these different preexperienced models and select the top 5%, 10%, and 15% samples for training while keeping other experimental conditions constant.
40As shown in Figure 5, when no pre-experienced model is utilized, the corresponding cherry models have the least performance.However, even in the absence of a pre-experienced model, our IFD score remains effective in identifying the good training data subset as it outperforms the Alpaca model when using 10% of the data.When 100 samples are utilized, the corresponding cherry models are slightly better than no samples used but with a similar trend, which indicates that 100 samples are not enough for the model to acquire the basic instruction-following ability.When adding the number of pre-experienced samples to 300, a distinct performance gain is discovered, and further addition of samples does not make the performance of corresponding cherry models better.We hypothesize this is when the model is equipped with the basic instruction-following capability.
Distribution of Pre-Experience Data
41To better illustrate what distribution of data is required in the pre-experience process, extensive experiments are conducted to consider choosing data by "Difficulty", "Diversity" and "Random".In the "Difficulty" setting, we select 1000 pre-experienced samples by calculating the IFD scores based on the initial raw model.In the "Diversity" setting, we select 1000 data by implementing the K-means algorithm.In the "Random" setting, we directly select pre-experienced data randomly.After obtaining
Results on LLaMA2 Models
42In this section, experiments on newer LLaMA2-7B and LLaMA2-13B models are conducted as shown in Table 3.In these experiments, the IFD score of each sample is calculated directly based on the corresponding LLaMA2 pre-trained models by using prompts from Vicuna (Chiang et al., 2023).On both LLaMA2-7B and LLaMA2-13B models, our cherry models trained with much less data outperform the models trained with original full data.These experimental results illustrate the consistent advantages of our method and further verify the generalizability of our method.5 Cherry Data Characteristics
Distribution Characteristics
43In this segment, our focus is on understanding the distributional properties of the cherry data within the original dataset.Specifically, we first compute the embedding of each instruction in the Alpaca dataset and employ t-SNE for dimensionality reduction, mapping high-dimensional embeddings to 2D space.The visualized vectors, color-coded based on the top or least 5% difficulty ratios, are showcased in Figure 6.Contrary to conventional beliefs, our cherry data isn't uniformly scattered.Instead, clear boundaries exist between samples of high and low difficulty, challenging prior assumptions that selected data should span the entire instruction spectrum and maximize diversity.
44To delve deeper into the distributional intricacies of instruction embeddings, the clusters with dense high IFD scores and clusters with dense low IFD scores are manually examined.Clusters dominated by low IFD score samples are replete with rudimentary tasks like editing punctuation, words, or sentences.In contrast, high IFD score clusters are typified by deeper, more intricate tasks such as storytelling or elucidation of phenomena.We posit that these in-depth tasks are paramount for aligning large language models, compelling them to rearrange and access their intrinsic knowledge repositories.Our methodology lends partial credence to this hypothesis, leaving room for further exploration.
Pattern Characteristics
45To better understand the pattern characteristics of the selected cherry data, we further utilize the Berkeley Neural Parser to discern the verb-noun structure within the instruction of each data sample.This analytical approach enables us to identify the main verb and its direct noun object in each instruction, providing a direct insight into what kind of instructions are prone to be assigned with higher 4.
46From this experiment, a clear discrepancy is revealed between the pattern characteristics of high-IFD data and low-IFD data.The high-IFD data mainly involves creative and complex instructions like "write story", "generate list", and "explain concept", which require a lot of creativity, thinking skills, and deep understanding.On the contrary, the low-IFD data are more about following rules and need less creativity, showing a wide range in how much thinking and creativity different tasks demand from language models.As a result, the reason why IFD is a valid metric for data filtering can be summarized by its ability to find the instructions that need more creativity and deep understanding.
476 Related Work
Data-driven Instruction Tuning
48Previous instruction tuning collections are typically handcrafted or task-related (Khashabi et al., et al., 2023;Li et al., 2023aLi et al., , 2024a).
Coreset Selection
49Coreset selection is pivotal in machine learning, aimed at identifying a representative subset of data points to expedite learning in various models.This approach finds its effectiveness in SVM learning (Tsang et al., 2005), K-means (Har-Peled and Kushal, 2005), and logistic regression (Munteanu et al., 2018) (Mou et al., 2016;Zhou et al., 2019).These varied applications underscore PMI's contributions to advancing natural language processing, offering valuable context for our IFD metric.
Conclusion
50Our study illuminates the potential of harnessing the innate capabilities of LLMs for selecting high-quality instruction tuning data that fit the model.Through our innovative self-guided approach, LLMs demonstrate the ability to discern and cherry-pick the most pertinent data samples.Central to our methodology is the Instruction-Following Difficulty score, a novel metric adept at gauging the nuanced differences between a model's autonomous outputs and expected responses.Our findings not only emphasize the importance of data quality over quantity but also underscore the potential for cost-effective LLM training.
Limitation
51The main limitation of this method is the inconvenience of training the pre-experienced model.The concept of the Instruction-Following Difficulty score proposed by us is simple and effective, while the inconvenient pre-experienced phase makes it hard to directly put our method into usage in realworld scenarios.Though experiments on LLaMA2 models show that calculating IFD scores directly on the base LLaMA2 models also promises a good selection, we believe using the pre-experienced phase is valuable since it equips base models with the basic instruction-following ability, making the calculation of Conditioned Answer Score more reasonable.As a result, we believe the use of the preexperienced phase could be a tradeoff: From the Research Viewpoint, using pre-experienced models is more reasonable and performs better.From the Real-world Implementation Viewpoint, directly using the base model is more efficient and at the same time effective as well.
A Implementation Details
52For (Chiang et al., 2023).Thanks to the Flash Attention mechanism (Dao et al., 2022), all models on LLaMA2 use the max length of 2048.
B Ablation on Data Selection Mechanism
53The ablation results of different methods on the Open LLM Leaderboard and Human Evaluation results are shown in
C Performance across Sub-Categories
54To evaluate the performance variations of our model, we scrutinize the capabilities across diverse instruction tasks.To accomplish this, we compare the response of our cherry models, trained with 5% Alpaca data and 10% WizardLM data, to their corresponding comparing models, the official Alpaca and the reimplemented WizardLM across subcategories in the WizardLM and Vicuna test sets, as displayed in Table 6 and Table 7.
55Our cherry model trained on Alpaca data exhibits superior or at least comparable performance to the official Alpaca model on most of the subcategories in the Vicuna and WizardLM test sets.Notably, exceptions are observed in the Math and Coding categories, corroborating the observations made by (Chen et al., 2023a).We surmise that the base 7B models inherently perform sub-optimally on these two tasks, necessitating a greater volume of data samples to effectively learn the alignment.
56Our cherry model trained on WizardLM data also has a better or comparable performance compared with the reimplemented WizardLM model on most of the subcategories.Specifically, Our model underperforms in Math, Code, Complex Format, and Counterfactual.The main reason our model loses in these categories is the abundance of training data for these categories in the original dataset and the supreme abilities of the original WizardLM in these tasks, which is mentioned in (Xu et al., 2023).As a consequence, when we reduce the number of data used, our model can not be trained on these data-needed categories as much as the original model, thus leading to a relatively incomparable performance.
D Results with Official WizardLM
57In this section, we provide the results of using 40% of the WizardLM data to have a comparable performance with the official WizardLM model in a relatively unfair setting.The official WizardLM is uncensored and trained with the max token size of 2048, while our model is trained with the max token size of 1024, representing an inherent disadvantage of our model.However, even with this situation, our model can still reach a comparable performance with the official WizardLM model, inferring the effectiveness of our method.
E Cherry Data General Characteristics
58Our goal in this section is to determine if the data selected based on the IFD scores aligns with known characteristics of high-quality training data.To this end, we randomly sample 100 instances from data with the top 5% scores and the least 5% scores.
59Utilizing ChatGPT, we evaluate each instruction on six aspects: Scope, Complexity, Clarity, Depth, Simplicity, and Knowledge Required.The results are depicted in Figure 8. Data with a higher IFD score generally scored higher in Scope, Complexity, Depth, and Knowledge Required, but lower in Clarity and Simplicity.Simplicity, in particular, have the most pronounced discrepancy.This lends credence to our assertion that our IFD scores aptly gauge instruction complexity.Consequently, our method gravitates towards selecting more intricate samples.As mentioned in the previous section, we try to evaluate each instruction into six aspects, Scope, Complexity, Clarity, Depth, Simplicity, and Knowledge Required.We define these aspects as follows:
60• Scope: The instruction encompasses the breadth and range of actions or information necessary for successful completion.• Complexity: The instruction integrates multiple steps or concepts that require careful attention and understanding.• Clarity: The instruction is articulated straightforwardly, ensuring it's easily understood without ambiguity.• Depth: The instruction provides thorough details and nuances, ensuring a comprehensive understanding of the task at hand.• Simplicity: While thorough, the instruction avoids unnecessary jargon or convolutions, making it accessible and easy to follow.• Knowledge Required: The instruction acknowledges and, if necessary, provides the foundational knowledge or context the user needs for successful execution.
61From the previous Figure 8, we can see samples selected with top IFD scores have larger scores in the aspects that reflect the difficulty of instruction, including Scope, Complexity, Depth, and Knowledge Required.These samples only underscore samples with the lowest IFD scores on the aspect of Clarity and Simplicity.This experiment detailedly illustrates the difference between samples with high or low IFD scores and verifies the effectiveness of our method in measuring the difficulty of an instruction.
F Cherry Example Analysis
62To illustrate the implications of our findings and demonstrate the characteristics of the data selected by our method, we provide several examples in Figure 9.
63The first positive example presents the situation that both the direct answer score (DA) and the conditioned answer score (CA) are relatively high.In this situation, the high DA means that it is hard for the initial pre-trained LLM to generate this poem, and the high CA means given the instruction does not make the generation of this poem much easier.So it is valuable for LLM to learn this sample.The second positive example presents the situation that both the CA score and DA score are relatively low.The low DA score means that LLM has learned this knowledge it is easy for LLM to generate this sentence.However, providing the corresponding instruction does not change the situation much, indicating the poor ability to follow this instruction.
64The first negative example presents a situation where the response is too short.Due to the intrinsic nature of next token prediction that longer texts tend to have lower perplexity, the DA score is relatively high for the response that is too short and thus causes the IFD Score large, which we believe is a good feature of our method.The second negative example presents a situation where the DA score and CA score are relatively small.In this example, the response is quoted from a book that LLM must have read, thus as a known knowledge, it is easy for LLM to reproduce this sentence.However, with an instruction included, the CA score becomes even much lower, indicating LLM has gained quite a good ability in following this instruction.The third example presents the most common situation, where the instruction is simply not difficult enough.
Positive Examples Negative Examples
65[Instruction] Create a poem that tells the story of a struggle against an unseen force.
66[Input] [Response] A distant enemy looms on the horizon, Selves of the light fight despite fear and fatigue.Innumerable obstacles barring their mission, Though seeming to weaken, strengths within achieve.
67Roots of bravery sustained their cause, Though many obstacles pushed and pulled.Heart's noise drowned out every pause, Escaping each struggle stronger and full.
68The reward of their labors thought clear and light, The force of the shadows still kept them at bay.Yet further pushed and tired through the night, Triumph steadily came in a growing display.
69Peace of their struggle found in the morning's glow, Rising higher than any unseen force's ebb and flow.
70[Direct Answer score (DA)]3.970[Conditioned Answer score (CA)]3.337[IFD score]0.928
71[Instruction] Give a brief description of the coronavirus.
[Input] [Response]
72Coronavirus is a type of virus that can cause illnesses ranging from the common cold to severe diseases such as Middle East Respiratory Syndrome (MERS) and Severe Acute Respiratory Syndrome (SARS).The virus is named for the crown-like spikes on its surface.It spreads primarily through close contact with an infected person, through small droplets from the nose or mouth after coughing or sneezing.Symptoms can include fever, tiredness, and dry cough.In severe cases, it can cause difficulty breathing, pneumonia, kidney failure, and even death.[Instruction] Generate a report summarizing a conversation about car maintenance.
73[Input] Joe and Lisa were discussing the importance of regular car maintenance such as oil changes, tire rotations, and brake inspects.Joe believes that regular car maintenance is essential for keeping the car operating properly and avoiding major repairs.Lisa believes that some car maintenance procedures are unnecessary and are a waste of money.
74[Response] Joe and Lisa discussed the importance of regular car maintenance such as oil changes, tire rotations, and brake inspections.Joe believes that regular car maintenance is essential for keeping the car operating properly and avoiding major repairs while Lisa believes that some procedures are unnecessary and are a waste of money.It is agreed that regular oil changes and tire rotations are important to maintain the health of the car but that some other maintenance procedures can be skipped depending on the age and condition of the car.
G Additional Discussion
75G.1 Fully-trained Model as Pre-Experienced Model?
76In our method, efforts are conducted to keep the preexperience process as simple as possible, however, there still exists a question of whether the fullytrained model can be the pre-experienced model for selecting the cherry samples.To better illustrate this question, the fully-trained Alpaca model is utilized as the pre-experienced model for selecting the cherry data, 5%, 10%, and 15% of the cherry data are selected and the corresponding cherry models are trained.The performances are shown in Table 9, in which the models with the fully-trained Alpaca hardly surpass the Alpaca with fewer data and our models.This experiment proves that the fully-trained model is not appropriate in selecting samples for the initial raw model, which is caused by the overly distribution gap between the fullytrained models and raw models.G.2 How Many Cherry Samples are Required?
77While extensive experiments with our method on Alpaca and WizardLM prove the effectiveness of our method in selecting high-quality samples from the original target dataset automatically, it is still under-exploring how much data is optimal.Unlike (Chen et al., 2023a) in which the scores of target samples are scarce, the dense scores from our method provide better flexibility in deciding how much data you can use.However, this flexibility is also a curse that makes it hard to conclude the optimal number of data to select, which is influenced by various factors including the absolute values of the IFD scores, the distribution of hard examples, and the number of data in original datasets.However, from our empirical study, we think selecting samples with the top 10% IFD scores would be a safe and reasonable choice.
H Prompt for Evaluation
78In this section, we provide the detailed prompt we used for evaluating the performance of two responses for the same instruction as shown in Figure 10.
Prompt for Performance Evaluation
79System Prompt You are a helpful and precise assistant for checking the quality of the answer.
80User We would like to request your feedback on the performance of two AI assistants in response to the user question displayed above.Please rate the helpfulness, relevance, accuracy, level of details of their responses.Each assistant receives an overall score on a scale of 1 to 10, where a higher score indicates better overall performance.
81Please first output a single line containing only two values indicating the scores for Assistant 1 and 2, respectively.The two scores are separated by a space.In the subsequent line, please provide a comprehensive explanation of your evaluation, avoiding any potential bias and ensuring that the order in which the responses were presented does not affect your judgment.
82Figure 10: The prompt we used to request ChatGPT or GPT4 to evaluate the responses.
I Detailed Main Comparison I.1 Comparison with the Official Alpaca
83As shown in Figure 11, we present the detailed comparison between our cherry models with the official Alpaca (7B) model across different test set with different percentage of cherry data, from 5% to 15%, using ChatGPT as the judge.Starting from 5% of the full data, our cherry models outperform the official Alpaca model in all these data scales.
I.2 Comparison with the Reimplemented WizardLM
84As shown in Figure 12, we present the detailed comparison between our cherry models with the reimplemented WizardLM (7B) model across different test set with different percentage of cherry data, from 5% to 15%, using ChatGPT as the judge.
85Our cherry models begin outperforming the reimplemented WizardLM from the scale of 10% of the data.
I.3 Comparison with the Official WizardLM
86As shown in Figure 13, we show the detailed comparison between our cherry models with the reimplemented WizardLM (7B) model across different test set with different percentage of cherry data, from 5% to 40%, using ChatGPT as the judge.
87When compared with the official WizardLM data, our cherry model achieves a comparable performance when using 40% of the WizardLM data, which is positive considering the inherent disadvantage of our training configuration.
J Detailed Ablation Comparison J.1 Data Randomly Selected
88As shown in Figure 14(a)(b)(c), we show the detailed comparison between the models trained with randomly selected data with our cherry models across different test set different percentage of data, from 5% to 15%, using ChatGPT as the judge.
89From 5% to 15% of the data, our cherry models consistently outperform the random models.
J.2 Data with Low IFD Score
90As shown in Figure 15, we show the detailed comparison between the models trained with data selected with low IFD scores with our cherry models across different test set with different percentage of data, from 5% to 15%, using ChatGPT as the judge.
91From 5% to 15% of the data, our cherry models consistently have better performances.
J.3 Data with High CA Scores
92As shown in Figure 16, we show the detailed comparison between the models trained with data selected with high conditioned answer scores with our cherry models across different test set with different percentage of data, from 5% to 15%, using ChatGPT as the judge.From 5% to 15% of the data, our cherry models consistently have better performances.
J.4 Number of Pre-Experienced Data
93Figure 17 shows the comparisons when different numbers of pre-experienced samples are utilized to train the pre-experienced model.
J.5 Distribution of Pre-Experience Data
94Figure 18 shows the comparisons when IFD scores are used as the strategy to select pre-experienced data to train the pre-experienced model.
J.6 Fully-trained Model as Pre-Experienced Models
95Figure 19 shows the detailed comparisons when the fully-trained official Alpaca is utilized as the pre-experienced model for selecting cherry data.The types of bias in machine learning include sampling bias, data bias, selection bias, measurement bias, model bias and inference bias.Sampling bias occurs when the dataset is not representative of the population;data bias happens when data is skewed or incomplete; selection bias arises when data is chosen in a non-random way; measurement bias is caused by incorrect labels or noisy data; model bias arises when the model is overly reliant on specific features or data; and inference bias is caused by the model being too simplistic.
96[Instruction] Generate a story about a journey in space.
97[Input]
98[Response] It was a beautiful day on Earth, but Andrew was not content to stay on land.He wanted to explore and experience the vastness of space.So, on that fateful day, he set off on an intergalactic voyage to the farthest reaches of the stars.... Exploring this new universe felt like a dream, and Andrew found himself discovering more wonders than he had ever imagined.One of his greatest adventures was traveling to a star that had never been seen by anyone before him.Years passed, and Andrew eventually returned to Earth, full of stories and memories of his travels.He had learned a great deal about the universe and made many friends along the way.His journey had taught him that space is full of boundless possibilities and wonders, and he will never forget his time in the stars.
99[Instruction] Provide an analysis of the impact of carbohydrates on human health.
100[Input]
101[Response] Carbohydrates are an important part of a balanced human diet and have been linked to a variety of health benefits when consumed in appropriate amounts.Carbohydrates are the main source of energy for the body and are important for the brain, organs, and muscles to function properly.... Choosing complex carbohydrates, such as fruits and vegetables, whole grains, and legumes, instead of simple carbohydrates that are found in processed and refined foods, can help to provide essential vitamins, minerals and other nutrients.
102Ultimately, carbohydrates are a necessary part of a healthy diet and should be consumed in moderation and in a balanced way.
Positive Example
103[Instruction] Outline the steps a startup would need to take to increase brand awareness [Input] [Response]
104Steps to Increase Brand Awareness for a Startup: 1. Identify target customers: Understand the target demographic and research their needs and interests.
1052. Develop a content strategy: Use content to engage, inform or entertain customers in order to establish a connection with them.
1063. Share the story: Create a website and create social media platforms to share the story, mission or purpose of the startup with customers.4. Make it interactive: Encourage audience participation via competitions, surveys, or polls.5. Track and analyze data: Measure the response of customers and use the insights to inform any changes or adjustments."
107[Instruction] Create a poem that is related to the season of Fall.
108[Input]
109[Response] The leaves are falling, leaves of autumn gold, A gentle breeze, a chill that blows, The sun that slowly sets, before night comes to fold, A season of beauty, with dreams to behold.The days grow shorter, the sky turns gray, The land it sighs as summer slips away, Orange, yellow, and crimson begin to display, Bringing in a vibrant beauty, during this time of day.
110The winds blow cold, as Frost begins to bite, The air whispers, chill and full of fright, It is the season of change, and so we all must write, The story of our lives, in the midst of this night."
111[Instruction] What are the major components of the Java programming language?
112[Input]
113[Response] The major components of the Java programming language are the Java Virtual Machine (JVM), the Java Runtime Environment (JRE), the Java Platform, the Java Development Kit (JDK), and the Java Libraries.These components provide core components such as threading, garbage collection, memory management and reflection, as well as APIs such as the I/O package, networking, graphics, and more.The JDK is the most fundamental component and is required to compile Java programs.It contains a compiler, interpreter, and other tools needed to create Java applications.
114The JRE, on the other hand, contains the necessary components to execute the Java programs.
115The JVM takes the compiled Java programs and executes them.Lastly, the Java Libraries are a vast collection of software packages written in Java that provide the necessary components for programmers to develop applications.
116[Instruction] Given a historical event, narrate an account of it in one paragraph.
117[Input] The sinking of the Titanic [Response] The sinking of the Titanic was one of the most devastating maritime disasters in history.On April 15th, 1912, the illustrious luxury liner set sail on its maiden voyage from Southampton, England, bound for New York City.Despite being touted as the ünsinkableship, the Titanic struck an iceberg and sunk in the early morning hours of the 15th.It took over two hours for the ship to completely disappear beneath the surface of the Atlantic Ocean.Over 1,500 souls were lost, and the disaster shocked the world.To this day, the tragedy of the Titanic serves as a somber reminder of the power of the sea and the fragility of human life.
118Figure 21: Positive examples sampled from the alpaca dataset with top 5% IFD scores.
Figure 1 :
119Figure 1: Overview of our proposed method.
120. (a) our model trained with only approximately 5% of the original Alpaca data beats the Alpaca model trained with full data.(b) our model trained with only approximately 10% of the original WizardLM data beats the reimplemented WizardLM model under the same training configuration which is described in the Implementation Details.Moreover, we craft subsets containing the top 5%, 10%, 15%, and 20% of the training datasets to train models, enabling us to investigate the performance changes.As shown in Figure 3, we draw the overall winning rate changes across the data growth, which is calculated as (Num(Win)−Num(Lose))/Num(All) +1, providing a direct indicator on the comparison with the full-data trained models.
Figure 2 :
121Figure 2: Comparing our models trained on selected data with full data.(a) Comparison between our model with 5% Alpaca data and the official Alpaca model.(b) Comparison between our model with 10% WizardLM data and the reimplemented WizardLM model.Both (a) and (b) use GPT4 as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 3 :
122Figure 3: The winning score changes over data growth by comparing our models with full-data models.The winning score is calculated as (Num(Win)−Num(Lose))/Num(All) +1.The Number of Wins, Losses, and All are calculated across all five test sets we used.When the value is higher than 1.0, it means this model performs better than the comparison.
Figure 4 :
123Figure 4: The overall winning score changes by comparing models using different data selection strategies with the official Alpaca model.
Figure 5 :
124Figure 5: The overall winning score changes by comparing models with different numbers of pre-experienced samples with the official Alpaca model.
Figure 6 :
125Figure 6: Visualization using t-SNE on instruction embeddings from the Alpaca dataset.Red points represent samples with the top 5% IFD scores and Blue points represent samples with the least 5% IFD scores.IFD scores or lower IFD scores.This experiment is conducted based on the Alpaca data, the top 10 occurred verb-noun pairs from the top 5% IFD scores data and the least 5% IFD scores data are shown in Table4.From this experiment, a clear discrepancy is revealed between the pattern characteristics of high-IFD data and low-IFD data.The high-IFD data mainly involves creative and complex instructions like "write story", "generate list", and "explain concept", which require a lot of creativity, thinking skills, and deep understanding.On the contrary, the low-IFD data are more about following rules and need less creativity, showing a wide range in how much thinking and creativity different tasks demand from language models.As a result, the reason why IFD is a valid metric for data filtering can be summarized by its ability to find the instructions that need more creativity and deep understanding.
Figure 7 :
126Figure 7: Comparing our models trained on cherry data with official WizardLM trained on full data using GPT4 as the judge.
Figure 8 :
127Figure 8: The comparison between data instances with top 5% and least 5% IFD scores from Alpaca data.We prompt ChatGPT to score the instruction of each data instance with respect of Scope, Complexity, Clarity, Depth, Simplicity, and Knowledge Required.
128[Direct Answer score (DA)]0.761[Conditioned Answer score (CA)]0.696[IFD score]0.914[Instruction] What emotion is expressed in this tweet?[Input] I'm so frustrated right now!! [Response] Frustration [Direct Answer score (DA)] 6.593 [Conditioned Answer score (CA)] 0.601 [IFD score] 0.091 [Instruction] Identify a famous quote from the given book [Input] Book: Pride and Prejudice by Jane Austen [Response] "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife."[Direct Answer score (DA)] 0.497 [Conditioned Answer score] 0.026 [IFD score] 0.053
129Figure 9: Example instances selected by our proposed method. 2 positive examples and 3 negative examples are provided.
Figure 11 :
130Figure 11: Comparing our cherry models with the official Alpaca model from 5% to 15% of the data using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 12 :
131Figure 12: Comparing our cherry models with the reimplemented WizardLM model from 5% to 15% of the data using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 13 :
132Figure 13: Comparing our cherry models with the official WizardLM model from 5% to 40% of the data using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 14 :
133Figure 14: Comparing our cherry models with models utilizing randomly selected data from 5% to 15%, using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 15 :
134Figure 15: Comparing our models with models trained with data selected with low IFD score from 5% to 15%, using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 16 :
135Figure16: Comparing our cherry models with models trained with data selected with high conditioned answer scores from 5% to 15%, using ChatGPT as the judge.Each horizontal bar represents a comparison in a specific test set.
Figure 17 :
136Figure 17: Comparing our cherry models with different numbers of pre-experienced samples with the Alpca model from 5% to 15%, ChatGPT as the judge.(a)(b)(c) and (d) represent the situation where 0, 100, 300 and 500 pre-experienced samples are utilized respectively.
Figure 18 :
137Figure 18: Comparing models whose pre-experienced data are selected by considering the difficulty of instructions with the Alpca model from 5% to 15%, using ChatGPT as the judge.
Figure 19 :
138Figure 19: Comparing models with fully-trained Alpaca as the pre-experienced model with the Alpca model from 5% to 15%, using ChatGPT as the judge.
Figure 20 :
139Figure 20: Positive examples sampled from the alpaca dataset with top 5% IFD scores.
Table 1 :
140The comparison of performance on Huggingface Open LLM Leaderboard and AlpacaEval Leaderboard.
Table 3 :
141The comparison of performance on Huggingface Open LLM Leaderboard and AlpacaEval Leaderboard.
1422020;
Table 4 :
143The top 10 occurred verb-noun pairs from the top 5% IFD scores data and the least 5% IFD scores data.Instructions that require creativity, thinking skills, and deep understanding tend to be assigned with higher IFD scores while instructions that are more about following rules and need less creativity tend to have lower scores.
144(Taori et al., 2023;et al., 2022; Wang et Xu et al., 2023;Ye et al., 2023;ch et al., 2023), (Wang et al., 2023b)utilized GPT3(Brown et al., 2020)to generate 52k distinct instructions, paving the way to generating instruction data set by distilling from teacher models(Xu et al., 2024).After the release of Meta LLaMA(Touvron et al., 2023a), the world witnessed a surge of open-sourced instruction tuning datasets and LLMs(Taori et al., 2023; Chiang et al., 2023;Xu et al., 2023;Ye et al., 2023; Ding
Table 5 .
145The human evaluation configuration is aligned with the main results.The win-tie-lose counts are from the perspective of our model: It represents our model better when the Win count is greater than the Lose count.
Table 5 :
146The ablation performance on Huggingface Open LLM Leaderboard and Human Evaluation.
Table 8 :
147The comparison of performance on Huggingface Open LLM Leaderboard and AlpacaEval Leaderboard.
Table 9 :
148The overall winning score changes over the data growth comparing models with fully-trained Alpaca as the pre-experienced model with the official Alpaca model.All the comparison in this table is performed by ChatGPT.
149K More ExamplesIn this section, some positive examples with top 5% IFD scores in the Alpaca dataset presented in Figure20 and 21.Negative examples with the least 5% IFD scores are presented in Figure22.
참고문헌
참고문헌 정보가 없습니다.