PaperHub
5.5
/10
Poster4 位审稿人
最低5最高6标准差0.5
6
6
5
5
4.3
置信度
正确性2.5
贡献度2.0
表达2.8
NeurIPS 2024

DDK: Distilling Domain Knowledge for Efficient Large Language Models

OpenReviewPDF
提交: 2024-05-13更新: 2025-01-15

摘要

关键词
Knowledge DistillationLarge Language ModelsModel Acceralation

评审与讨论

审稿意见
6

This paper proposes DDK, a knowledge distillation (KD) framework that distills large language models (LMs) into small LMs. Unlike previous KD methods, DDK dynamically adjusts the domain weights during distillation. Experiments show that DDK outperforms other KD baselines across various tasks.

优点

  1. The paper is well written and the method is easy to follow.
  2. The experiments show that DDK outperforms other KD baselines on various tasks.

缺点

The extra computation introduced by KKD should be considered. It seems KKD requires the inference of a large LM during the training of the small LM. When the teacher model is much larger than the student model (QWen-1.5 14B v.s. QWen-1.5 1.8B), the inference cost of the teacher model would be even larger than training the student model. Therefore, it is more reasonable to compare the performance of the distilled model and the baselines given the same FLOPs.

问题

  1. What are the training data for the baselines (CPT, TED, KD, and MiniLLM)? Is the data for DDK the same as that for the baseline methods?
  2. In lines 178-179, is the learning rate 3e-5 (3×1053\times 10^{-5}) rather than 3e53e^{-5}?

局限性

N/A

作者回复

Thanks for your careful reading and constructive suggestions. We will address your concerns shown below in detail.

Q1: Extra computation introduced by DDK should be considered. Compare the performance of the distilled model and the baselines given the same FLOPs.

A1: Thanks for your insightful suggestions. In Table 13 of Appendix B.2, we also report the training costs (i.e., TFLOPs) of different baseline methods, and we observe that the additional computation costs are acceptable when compared with the baseline KD method. Besides, we observe the ratio between the TFLOPs of DDK and TFLOPs of CPT is (5.401e8/1.456e8)=3.709. Then, we also perform the experiments by continuing pre-training the student model with about 56B tokens, where the TFLOPs is about 5.4e8. The results are shown in the following table. In the table, we observe that when we continue pretraining the student model for more tokens without using the teacher guidance, little gain is obtained. We assume that the Qwen1.5 model has been trained on >3T tokens, and the convergence status is stable when using the standard pretraining method. In contrast, when using the teacher guidance of the DDK, we observe consistent performance improvements in Table 1, Table 2, Table 7, and Table 8, which further demonstrates the effectiveness of our DDK.

ModelsTFLOPsCEvalMMLURACEC3W.G.GSM8KC.QAArc-EArc-CH.E.MBPPAvg.
Teacher (Qwen1.5-14B)-78.6864.3489.9577.3868.7467.6382.0687.5880.5937.8044.0070.80
Student (Qwen1.5-1.8B)-59.6644.4869.5758.2757.8538.464.7070.2350.3111.8718.0049.39
+CPT (15B tokens)1.456e860.1345.0169.0060.3056.9842.5064.7872.0051.0313.1220.4550.48
+DDK (15B toekns)5.401e863.7546.0171.5665.5359.1053.5466.7575.0155.0327.1326.1055.41
+CPT (56B tokens)5.436e860.1545.0069.1660.4357.0642.9164.8672.1451.1913.4120.7450.64

We will revise the above discussion in our new version.

Q2: Is the data for DDK the same as that for the baseline methods?

A2: The training data is the same and we adopt the same seed for shuffling the dataset, which can ensure the training data same for different methods. We will clarify this detail in our new version.

Q3: Learning rate issue.

A3: Thanks for your kind suggestions. We will revise this typo in the new version.

评论

I thank the authors for their response. After reading the response, I think my current score is appropriate.

评论

Thanks for your feedback. We will carefully address your concerns in our new version.

审稿意见
6

The paper introduces a new framework called Dynamic Domain Knowledge Distillation (DDK) to enhance the efficiency of knowledge distillation for large language models (LLMs). Unlike traditional methods that overlook domain performance differences between student and teacher models, DDK dynamically adjusts the distillation dataset composition based on these differences, ensuring a more stable and effective knowledge transfer. This approach addresses the issue of excessive focus on domains with minimal performance gaps and enhances overall model performance. Extensive evaluations demonstrate that DDK significantly outperforms existing knowledge distillation methods and continuously pretrained baselines.

优点

  • The proposed dynamic dataloader for KD is technically sound.
  • Numerical experiments well validate the efficacy of the method.

缺点

  • Dynamic dataloader requires knowing the training data distribution and category beforehand.
  • Missing references. Similar ideas have been explored in pruning LLMs, such as ShearedLLaMA, LoRAShear to recover the knowledge . The paper needs to discuss with them in the related work section due to the closed relation between pruning and KD.

Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning

LoRAShear: Efficient Large Language Model Structured Pruning and Knowledge Recovery

问题

  • How the methods perform on under other KD losses, such as reversed KLD, JSD, skew-KLD.

On-policy distillation of language models: Learning from self-generated mistakes.

DistiLLM: Towards Streamlined Distillation for Large Language Models.

局限性

Yes.

作者回复

Thanks for your careful reading and constructive suggestions. We will address your concerns shown below in detail.

Q1: Require knowing the training data distribution and category beforehand.

A1: Our DDK requires the training data distribution and category to divide the domains and we acknowledge this limitation. However, it should be mentioned that existing pretraining datasets usually provide the source composition. For example, the Repajama[https://www.together.ai/blog/redpajama] includes 7 domains (i.e., CommonCrawl, C4, Github, Wikipedia, Books, ArXiv, and StackExchange), The Pile [https://arxiv.org/pdf/2101.00027] includes 22 domains (i.e., Pile-CC, PubMed Central, Books3, OpenWebText2 and etc.) and Dolma[https://arxiv.org/pdf/2402.00159] includes 6 domains (i.e., Common Crawl, GitHub, Reddit, Semantic Scholar and etc.)

Meanwhile, we also tried another option to dive the training data into 10 domains based on the clustering method to address this limitation, where we first extract the feature of each document using [https://huggingface.co/BAAI/bge-m3] and then use k-means to divide the training corpus into 10 domains implicitly. Then, we apply DDK on the divided implicit domains based on the clustering and we call this method DDK (clustering), where we do not need to know the training data distribution and category. In the following table, we observe that the DDK (clustering) achieves relatively comparable performance with original DDK. We assume that the explicitly divided domains based on the sources (e.g., The stack, OpenWebMath) are distinct. Besides, we will continue to investigate the clustering method, which is more scalable.

ModelsCEvalMMLURACEC3W.G.GSM8KC.QAArc-EArc-CH.E.MBPPAvg.
Student (1.8B)+DDK63.7546.0171.5665.5359.153.5466.7575.0155.0327.1326.155.41
Student(1.8B)+DDK(clustering)63.1946.1172.4167.0359.0351.5965.0174.9155.9525.4326.3855.19

Q2: Cite and discuss shearllama and lora shear.

A2: Please See General Response (G.Q2) on the discussion between Sheared LLaMA and DDK.

The discussion between LoRAShear and DDK is as follows.

The LoraShear is proposed for structured pruning on LLMs, which first creates the dependency graphs over LoRA module and then proceeds progressive structured pruning on LoRA adaptors. To recover the lost knowledge during pruning, LoRAShear proposes a Dynamic Knowledge Recovery scheme on both the pre-training and instructed fine-tuning datasets to effectively narrow down the performance gap to the full models. In contrast to LoraShear, DDK aims to efficiently transfer the domain knowledge of the teacher network, and propose a factor smooth updating strategy to stabilize the domain knowledge guided sampling process.

We will cite these works in our new version.

Q3: How the methods perform under other KD losses (reversed KLD, JSD, skew-KLD)?

A3: To address the mode-averaging problem of the student model, where the student model learns an overly smooth distribution in an attempt to cover the teacher’s entire support set, the reversed KLD in MiniLLM and generalized GSD in [R1] are proposed. However, these on-policy approaches (i.e., the reversed KLD and the generalized JSD) show lower efficiency, the skew-KLD in [R2] introduces the adaptive off-policy approach to enhance the efficiency. In contrast to these works, our DDK focuses on efficiently transferring the domain knowledge of the teacher network based on standard forward KD loss, where the motivation and technical details are different from these works a lot. Besides, our DDK is also orthogonal to these KD losses, where we can directly replace the KL divergence in Eq. 3 with the above losses in MiniLLM, [R1] and [R2] easily. In the following table, we report the results of our DDL using different distillation losses, and we observe that these losses have not provided more performance gains for our DDK based on KLD. For this phenomenon, we assume that our DDK focuses on the pre-training setting with a relatively large training data set, where the data quality and data mixture are very important for pretraining (See G.Q1). Meanwhile, in MiniLLM and [R1, R2], these losses mainly focus on the SFT phase to improve learning efficiency by addressing the mode-averaging problem. Therefore, we assume that the main contribution on the improvements comes from changing the domain mixture in our DDK. In the future, we will also continue to investigate the optimal distillation loss formulation for our DDK following [R1, R2].

ModelsCEvalMMLURACEC3W.G.GSM8KC.QAArc-EArc-CH.E.MBPPAvg
Student (Qwen1.5-1.8B)59.6644.4869.5758.2757.8538.464.770.2350.3111.871849.39
+DDK (Default KLD in Eq.3)63.7546.0171.5665.5359.153.5466.7575.0155.0327.1326.155.41
+DDK (Reversed KLD in MiniLLM)62.1945.8570.6665.0354.6750.665.1174.5152.3823.4424.6753.56
+DDK(JSD in [R1])62.6345.7271.765.5857.1453.0767.0875.3454.9522.6125.1554.63
+DDK(skew-KLD in [R2])62.9645.4271.8465.7158.5953.4567.1675.4655.0326.0525.9855.24

[R1]: On-policy distillation of language models: Learning from self-generated mistakes, https://arxiv.org/pdf/2306.13649

[R2]: DistiLLM: Towards Streamlined Distillation for Large Language Models, https://arxiv.org/pdf/2402.03898

评论

I am satisfied with the additional discussions and results, upon which I decide to increase my rate.

评论

Thanks for your feedback. We will carefully address your concerns in our new version.

审稿意见
5

The work introduces a novel framework for knowledge distillation (KD) for LLMs. The key innovation of DDK is its dynamic adjustment of the distillation dataset composition based on domain performance differences between the teacher and student models. The paper presents extensive evaluations demonstrating that DDK significantly improves performance in various KD settings, outperforming both continuous training baselines and existing KD methods.

优点

  1. The authors provide extensive empirical evidence demonstrating the effectiveness of DDK in improving the performance of student models across various benchmarks.
  2. As the computational and storage demands of LLMs are significant barriers to their widespread deployment, KD is a promising solution. The proposed KD method is simple and easy to follow.

缺点

  1. Discuss the difference between DDK and the Dynamic Batch Loading proposed by Sheared LLaMA[1], which is also proposed to adjust domain proportions for dynamically training smaller models. They also identify discrepancies in loss between smaller and larger models across various domains, and accordingly, they sample more data from domains where the discrepancy is more pronounced. While they concentrate on structural pruning, it is akin to the DDK. Consequently, I perceive the novelty of DDK as being somewhat limited.
  2. The results of Qwen 1.5 in Table 1 are not significantly convincing. The MMLU/HumanEval of Qwen 1.5 1.8B in the Qwen official blog are 46.8/20.1 while the authors' report is 44.5/11.9. In addition, compared to the official results, we can see that the DDK fails to improve the model of the students on MMLU. The authors need to check this and provide more robust results of baselines.

[1] SHEARED LLAMA: ACCELERATING LANGUAGE MODEL PRE-TRAINING VIA STRUCTURED PRUNING. Xia et al., 2023

问题

  1. In the setting of paper, the domains are predefined. How to extend the DDK framework for new domain during the distillation training process? Could give more experiments on continual domain learning settings?

局限性

Yes.

作者回复

Thank you for your valuable comments.

Q1: Discuss with Sheared LLaMA. Novelty.

A1: Please See General Response (G.Q1 and G.Q2).

Q2: Qwen1.5 results on MMLU and Humaneval.

A2: For MMLU, the accuracy from Qwen Blog is based on a 5-shot setting, while the result in Table 1 is based on a zero-shot setting (See Line 182). Besides, we provide the 5-shot result of MMLU in Table 12 and observe the result is 45.59, which is close to the provided result (46.8) of the Qwen blog. Besides, we assume the gap between 46.8 and 45.59 comes from the evaluation prompt. Specifically, the evaluation prompt for DDK is as follows:

# Prompt-1
for opt in ['A', 'B', 'C', 'D']:
    prompt="Answer the question.\nQuestion: {question}\nChoices:\nA. {A}\nB. {B}\nC. {C}\nD. {D}\nAnswer: " + opt

The {question}, {A}, {B}, {C}, {D} are the corresponding inputs for each evaluation sample.

We also have tried the following prompt from OpenCompass [https://github.com/open-compass/opencompass], where the task description is also added to the evaluation prompt. Note that the mmlu_all_sets contains 57 tasks. Based on this prompt, we obtain 46.88 and 47.05 under the zero-shot and few-shot settings, respectively.

# Prompt-2
mmlu_all_sets = ['college biology', 'college chemistry', 'college computer science', ..., 'human aging', 'us foreign policy', 'conceptual physics']
for task in mmlu_all_sets:
    for opt in ['A', 'B', 'C', 'D']:
        prompt="The following are multiple choice questions (with answers) about" + task + '\n\n' + "{question}\nA. {A}\nB. {B}\nC. {C}\nD. {D}" + '\n' + 'Answer: ' + opt

We also provide the following results and DDK achieves consistent improvements in MMLU.

Prompt-1Prompt-2Prompt-1(few-shot)Prompt-2(few-shot)
Student (1.8B)44.4846.8845.5947.05
+DDK46.0147.9547.5948.12

For Humeneval, we observe that the results of Qwen1.5-1.8B are very sensitive to the prompt, and we use the naive testing prompt (accuracy of 11.87) as follows:

# Prompt-1
prompt='{prompt}'

Similarly, we have tried following two prompts following OpenCompass:

# Prompt-2
prompt='Complete the following python code:\n{prompt}'
# Prompt-3
prompt='You are an intelligent programming assistant to produce Python algorithmic solutions.\nCan you complete the following Python function?\n```python\n{prompt}\n```'

And we observe the results of Prompt-2 and Prompt-3 are 23.17 and 26.83, respectively, which are higher than the reported result (20.1) on Qwen blog.

Meanwhile, we report the DDK results on these three evaluation prompt settings. In the following table, we observe that DDK still achieves better performance than the baseline. In new version, we will provide a detailed analysis of the evaluation prompt and provide more solid and robust results.

Prompt-1Prompt-2Prompt-3
Student (1.8B)11.8723.1726.83
+DDK27.1329.5931.08

Q3: Extend DDK for new domains during distillation.

A3: In distillation, when a new domain is introduced, we first need to prepare the validation dataset for this domain following Appendix B.1 (Line 490-510). Then, following Eq. (1), based on the current model checkpoint, we compute the perplexity scores over the validation sets of all domains for student and teacher respectively, and obtain the newly initialized domain discrepancy factor, which is then used to change the domain mixture following the Algorithm 1 of the main paper.

Q4: Experiments on continual domain learning setting.

Q4: We provide the results of involving a new source domain data (i.e., Law) using the Pile-of-Law dataset [https://huggingface.co/datasets/pile-of-law/pile-of-law]. Specifically, we first train the original 10 domains for 5B/10B tokens. Then, we append the Law domain into the training dataset. After that, following Algorithm 1 of the main paper, we continue the distillation training on the student for additional 10B/5B tokens on these 11 domains, which aims to achieve a fair comparison with the DDK baseline results on 10 domains for about 15B tokens. To show the effect of introducing the law domain, we additionally report the results on the law subset of MMLU-Pro[https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro]. (MMLU-Pro has 14 high-quality subsets with challenging questions.), and observe that by introducing the law domain, better results on the MMLU-Pro(Law) are obtained, and results on other datasets are also preserved well.

ModelsMMLURACEW.G.GSM8KArc-EArc-CMMLU-Pro(Law)Avg.
Student (Qwen1.5-1.8B)44.4869.5757.8538.470.2350.3114.449.32
Student+DDK(train 5B on original 10 domains)44.1269.7958.1744.3572.3952.7514.850.91
Student+DDK(train 5B on original 10 domains+10B with additional new law domain)45.9871.4358.6151.1274.7854.9516.2953.31
Student+DDK(train 10B on original 10 domains)45.8570.9659.1949.6674.0753.1814.6852.51
Student+DDK(train 10B on original 10 domains+5B with additional new law domain)46.1271.0258.852.5174.3654.2715.7553.26
Student+DDK(train 15B on original 10 domains, baseline in Table 1)46.0171.5659.153.5475.0155.0314.7453.57
评论

Hi, we sincerely thank you very much for these constructive comments and evaluation of our manuscript. As the discussion phase will be closed on Aug 13 11:59 pm AoE, we would like to kindly ask you to take a look at our responses and reevaluate our work based on our clarifications. Please let us know whether our response addresses your concerns or whether there is any further detail we can provide to help address these concerns.

Thank you again for dedicating your time to reviewing our paper.

评论

My main concerns and questions are set out in the rebuttal. I suggest that the author add a comparison or discussion of DYNAMIC BATCH LOADING in sheared llama in the next version, as I still think they are similar techniques.

评论

Thanks for your feedback. We will carefully address your concerns and questions in our new version.

审稿意见
5

This work proposed a KD strategy for LLMs. Specifically, with assess to the domain-specific performance of both the teacher and student LLMs, DDK uses domain knowledge guided sampling to dynamically update the data mixture. In addition the paper also conducts a statistical analysis of the domain distribution of the datasets involved. The training process is relatively straightforward and easy to generalize. The experimental results also show that DDK's training method improves the performance average of different data sets.

优点

  1. A complete training algorithm is designed, and the process is explained clearly. The process of the DDK algorithm is easy to extend to the training process of other models.
  2. The authors conducted a comprehensive knowledge distillation experiment on two large model families and a comprehensive ablation study.

缺点

  1. Although the method proposed in this paper is easy to understand and effective, I doubt that the method in this paper is limited to LLMs. In other words, this paper does not mention (or needs to explain) how previous researchers (before LLMs) performed domain-enhanced distillation for domain-biased datasets, and why these previous methods cannot be applied to the distillation of LLMs to achieve similar results. The advantages and novelty of this paper's domain sampling method over previous work that may be transferable to LLMs need further explanation.
  2. In the experimental part, there is a lack of key comparison between DDK and other methods that focus on similar domain sampling. The baseline actually involves the work that focuses on domain in KD (cited as [60], etc.), but the subsequent analysis only compares the total average score of DDK and these works, which seems to lack comparison and analysis of similar works. As far as I know, other baselines are more general KDs, and do not focus on domain information. It is certainly worth noting that DDK performs better than baselines such as MiniLLM, but I think what can better illustrate the effectiveness and novelty of this paper is the comparison with similar domain data sampling, including experimental analysis.
  3. In the experimental section, you can add experiments on the dataset and the scale property of the teacher model. This is a possible suggestion.

问题

The questions I expect to ask would be similar to the above section.

局限性

The method proposed in this paper is very complete and solves the problem well, but there are perhaps two points to note:

  1. The distillation method designed in this paper does not seem to be necessarily limited to LLMs. One of the main difficulties of KD on LLM may be that the distribution difference between the teacher and student models is too large, but the key points that this paper focuses on and solves seem to be orthogonal to this point. So it also leads to a similar question: why previous similar methods that focus on domain sampling cannot be migrated to LLMs, and what are the advantages and novelties of this paper's design.
  2. Following point 1, in the experiment, what are the specific advantages of this method over the predecessors in the domain problem (not just the overall average, of which result shows DDK outperformed others). This may be what I am very curious about after reading the paper.
作者回复

Thank you for your nice comments and suggestions.

Q1: Compare domain-enhanced KD methods.

A1: After investigating KD [R1] and applications on LLMs [R2], we have observed existing domain-enhanced KD methods can be divided into two categories. The first is cross-domain KD for domain adaptation to improve the generalization abilities of the unseen target domains based on seen source domains. In contrast, DDK aims to improve training efficiency and effectiveness given multiple seen domains, and these cross-domain KD methods cannot be applied to LLM pretraining. The second is based on multi-teacher strategy [R3, R4], which first trains different domain expert models and then distills the overall domain capacities into one single model. Thus, we implement two baselines following [R3, R4].

[R1]. Knowledge Distillation: A Survey

[R2]. A Survey on Knowledge Distillation of Large Language Models

[R3]. BAM! Born-Again Multi-Task Networks for Natural Language Understanding

[R4]. Knowledge Fusion of Large Language Models

Specifically, first, we train the domain expert models on 10 different domains as teacher models, where each domain expert is trained on about 5B tokens on the corresponding domain. Then, for the first baseline [R3], we select a corresponding teacher to produce logits for each sample based on the belonged domain. For the second baseline [R4], we ensemble logits from different domain teacher models. The table below lists the PPL on validation datasets for 10 domains.

CCC4The StackWikipediaBooksArxivStackExchangeChinese BooksChinese CCOpenWebMath
Student10.1518.504.1413.2725.8112.9710.0423.5421.209.50
+[R3]10.0019.144.1410.1222.7312.908.3720.5920.194.75
+[R4]10.0619.094.389.5426.0112.729.4620.5120.125.97
+DDK10.0218.943.958.3620.4311.237.2219.6920.334.62

We also report the downstream results and observe that baseline methods are inferior to DDK. We assume that these methods only consider producing better teacher guidance, and do not consider the effect of the domain mixture for LLM pretraining.

ModelsMMLURACEW.G.GSM8KArc-EArc-CH.E.Avg.
Student44.4869.5757.8538.470.2350.3111.8748.96
+[R3]45.0268.2558.847.2471.1752.4419.0951.72
+[R4]45.5368.3258.2539.6574.3353.8420.2651.45
+DDK46.0171.5659.153.5475.0155.0327.1355.34

Q2: Experiments on dataset and scale property of teacher.

A2: For experiments on dataset, we have performed experiments using StarCoder on Stack V2 dataset in Table 11. Besides, we perform experiments on The Pile dataset [https://arxiv.org/pdf/2101.00027] with 22 domains, and we use Qwen-1.5 14B and Qwen-1.5 1.8B as teacher and student following Table 1. Note that as The Pile focuses on English, we do not evaluate CEval and C3.

ModelsMMLURACEW.G.GSM8KC.QAArc-EArc-CH.E.MBPPAvg.
+CPT (main paper)45.0169.0056.9842.5064.7872.0051.0313.1220.4548.32
+DDK (main paper)46.0171.5659.1053.5466.7575.0155.0327.1326.1053.36
+CPT(The Pile)44.7468.8656.4340.5664.2971.1350.3412.2018.4847.45
+DDK(The Pile)45.7269.9858.8045.4165.4474.0354.5222.5622.5951.01

We observe that DDK achieves better performance than CPT baseline on The Pile and results on The Pile are relatively lower than results in our main paper. We assume that the data quality used in our main paper (See Line 166-171) is better than The Pile, as we directly use the original Pile dataset in 2021 without additional cleaning strategies.

For scale property of teacher, we have used different sizes of teacher models (i.e., Qwen1.5-14B and Qwen1.5-7B) to distill Qwen1.5-1.8B in Table 1 and Table 8, and average results distilled by Qwen1.5-14B and Qwen1.5-7B are 55.41 and 53.64, respectively, which means that better results are achieved using a relatively larger teacher.

Q3: Advantages and novelties of DDK.

A3: Please See General Response (G.Q1).

Q4: Advantages over predecessors (not the overall average).

A4: First, in Fig. 1, DDK can reduce the performance gaps between teacher and student a lot in many domains. For example, for DDK, PPL on the Books domain is less than other methods a lot, and PPL on StackExchange domain is very close to teacher.

Second, in Table 1, we observe that a large relative performance gap usually exists in reasoning-related tasks for teacher and student. For example, relative performance gap ratios are 43.22% [(67.63-38.4)/67.63=43.22%] and 68.59%[(37.80-11.87)/37.80=68.59%] for GSM8K and Humeneval, respectively. In contrast, for knowledge-related tasks, the relative performance gap ratios are 24.17% [(78.68-59.66)/78.68=24.17%] and 30.87%[(64.34-44.48)/64.34=30.87%] for CEval and MMLU. After using DDK, the relative performance gaps are 20.84%, 28.23%, 18.98%, 28.49% on GSM8K, Humeneval, CEval and MMLU. In contrast, for ``CPT & DoReMi'' and MiniLLM, the relative performance gaps are [32.18%, 76.85%, 21.91%, 30.15%] and[27.69%, 55.34%, 21.63%, 29.95%], respectively. Thus, we assume that DDK can greatly improve the weaknesses on reasoning-related tasks.

评论

Hi, we sincerely thank you very much for these constructive comments and evaluation of our manuscript. As the discussion phase will be closed on Aug 13 11:59 pm AoE, we would like to kindly ask you to take a look at our responses and reevaluate our work based on our clarifications. Please let us know whether our response addresses your concerns or whether there is any further detail we can provide to help address these concerns.

Thank you again for dedicating your time to reviewing our paper.

评论

The comparison with MiniLLM in a similar domain sampling strategy is also discussed in Q3 from Reviewer oZHE, where we can directly replace the KL divergence loss in Eq. 3 with the reversed KLD loss in MiniLLM. In A3 for Q3 from Reviewer oZHE, we call this alternative method as DDK (Reversed KLD in MiniLLM), and we observe that replacing the distillation loss does not bring more gains when compared with the DDK with default KL divergence loss. For this phenomenon, just discussed in A3 , we assume that our DDK focuses on the pre-training setting with a relatively large training data set, where the data quality and data mixture are very important for pretraining (See G.Q1). Meanwhile, the MiniLLM focuses on the SFT phase to address the mode-averaging problem in distillation. Therefore, we assume that the main contribution on the improvements comes from changing the domain mixture in our DDK.

We will include this discussion in our new version.

评论

Dear Reviewer foae,

Hello! We appreciate your support for the detailed suggestions on our paper. We would like to kindly ask you to take a look at our responses and reevaluate our work given our clarifications. Again, we would like to sincerely thank you very much for these constructive comments and evaluation of our manuscript.

作者回复

General Response

Thanks a lot for handling/reviewing our submitted manuscript. We would like to thank the reviewers for their thoughtful and constructive comments and suggestions. By addressing each of the issues raised by the reviewers, we believe that the quality and clarity of our DDK can be improved a lot. The general responses are summarized as follows:

G.Q1: The advantages and novelties of this paper's design.

A1: The pretraining datasets for LLMs are typically sampled from a mixture of many domains. These data from different domains interplay with each other, showing complex interchangeable, unrelated, or contradictory relationships. Besides, many works have claimed that the data mixture of the pretraining data greatly affects the effectiveness of LLMs[R1,R2,R3,R4,R5,R6] and selecting the optimal domain mixture is a challenging problem. Based on knowledge distillation, our DDK aims to produce effective lightweight LLMs by transferring the domain knowledge of the teacher network. Specifically, in Fig. 1 of the main paper, we observe that the performance gap between student (Qwen-1.5 1.8B) and teacher (Qwen-1.5 14B) varies significantly across domains, which means that we need to adjust the domain mixture to better improve the weaker domains by reallocating more data sampling weights. Besides, in Table 1, Table 2, Table 7 and Table8, our DDK is better than the baseline KD a lot, which shows the effectiveness of changing the domain mixture in distillation. Therefore, we are the first to investigate the effectiveness of domain mixture for distilling LLMs and introduce the DDK to enhance the student LLMs. Meanwhile, we observe that naively changing the domain weight compromises the stability of the distillation (See Fig.3) and propose the factor smooth updating strategy to stabilize the distillation.

Overall, our DDK is motivated by the effectiveness of the domain mixture on the lightweight LLMs and we design corresponding strategies to better transfer the domain knowledge of the teacher network.

G.Q2: Discuss with Sheared LLaMA.

A2: Datasets for training LLMs are sampled from many domains and the data mixture of the pretraining data greatly affects the effectiveness of LLMs[R1,R2,R3,R4,R5,R6]. We should emphasize that the motivation of adjusting domain mixtures is similar for Sheared LLaMA and our DDK, but the solved tasks and technical details are different a lot.

First, for the solved tasks. the Sheared LLaMA is proposed for structure pruning, while our DDK is proposed for knowledge distillation on the LLMs. Therefore, our DDK is orthogonal to the Sheared LLaMA and we can further improve the performance of small models pruned by Sheared LLaMA. In the following table, following the setting of Table 2, we propose to use the LLaMA2-13B to distill the Sheared-LLaMA-1.3B model, which is pruned by Sheared LLaMA based on LLaMA2-7B.

ModelsMMLURACEW.G.Arc-EArc-CAvg.
Student (Sheared-LLaMA-1.3B)25.7123.6256.8141.5328.1435.16
+DDK28.2527.4358.1244.9231.8538.14

Second, for the technical details, the sheared LLaMA needs to first fit a scaling function using three open-sourced LLaMA models (i.e., LLAMA2-7B/13B/70B) when pruning the LLaMA model series, where the fitting data points are very limited. In Sheared LLaMA, the authors also claim the estimated reference losses for different domains are also biased as the limited data points for estimating the scaling law parameters. Besides, in many real-world pruning scenarios, we cannot usually obtain a series of models under the same training setting. Thus, we cannot predict the losses across different domains of the small size model when a series of models are not provided. In contrast, in DDK, we directly use the domain loss predicted by the teacher model as the reference loss without fitting the scaling function, where the teacher predicted losses are used as the accurate guidance to improve the student model. Besides, the Sheared LLaMA is proposed to enhance the training efficiency of the continued pre-training setting of the pruned model, the guidance of the teacher model is not included. In addition, our DDK also introduces the factor smooth updating strategy, which is not used in Sheared LLaMA and can make the change of the domain mixture more stable. Moreover, in the following table, we also provide the results of replacing our proposed factor smooth updating strategy with the strategy of Sheared LLaMA, and observe that DDK is better a lot, which further shows the effectiveness of our factor smooth updating strategy.

ModelsMMLURACEW.G.Arc-EArc-CAvg.
Student+DDK(Qwen-1.5-1.8B)46.0171.5659.175.0155.0361.34
Student+DDK using Sheared LLaMA updating strategy (Qwen-1.5-1.8B)45.0370.1657.0973.9853.1859.88

[R1]. An empirical analysis of compute-optimal large language model training, https://arxiv.org/abs/2203.15556

[R2]. Data selection for language models via importance resampling, https://arxiv.org/abs/2302.03169

[R3]. Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning, https://arxiv.org/abs/2310.06694

[R4]. RegMix: Data Mixture as Regression for Language Model Pre-training, https://arxiv.org/abs/2407.01492

[R5]. Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performance, https://arxiv.org/abs/2403.16952

[R6]. DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining, https://arxiv.org/abs/2305.10429

评论

Dear Reviewers:

Hello! Since the discussion period has started, we would like to kindly ask you to take a look at our responses and reevaluate our work based on our clarifications. Please let us know whether our response addresses your concerns or whether there is any further detail we can provide to help address them. We appreciate your time and consideration!

评论

Thanks for handling/reviewing our submitted manuscript: "DDK: Distilling Domain Knowledge for Efficient Large Language Models". We would like to thank the reviewers for their insightful and constructive comments and suggestions. By addressing each of the issues raised by the reviewers, we believe that the quality and clarity of our DDK can be improved a lot. The major responses are summarized as follows:

(1). We have carefully discussed the advantages and novelties of DDK (See Reviewer foae.Q3, Reviewer EYh3.Q1)

(2). We have additionally compared the domain-enhanced KD methods and discussed the advantages over previous methods in detail (See Reviewer foae.Q1&Q4).

(3). We have provided experiments on another training dataset and discussed the scale property of teacher (See Reviewer foae.Q2).

(4). We have provided more clarification and discussion on the evaluation prompts (MMLU and Humeneval) and continual domain learning (See Reviewer EYh3.Q2&Q3&Q4)

(5). We have discussed the limitations of requiring data distribution and provided experiments based on the clustering method to address this limitation (See Reviewer oZHE.Q1).

(6). We have discussed more related works (e.g., Sheared LLaMA, LoRAShear, Skew-KLD) and conducted a detailed analysis of these works (See Reviewer EYh3.Q1, Reviewer oZHE.Q2&Q3).

(7). We have provided a more detailed analysis and clarification on the training costs, training data, and learning rate (See Reviewer 6kDi.Q1&Q2&Q3).

Again, we would like to sincerely thank you very much for these constructive comments and evaluation for our manuscript.

评论

Dear reviewers: as you are aware, the reviewer-author discussions phase ends on Aug 13. We request you to kindly make use of the remaining time to contribute productively to these discussions. If you have not read and/or responded to author rebuttal, please do it asap so that the authors get a chance to respond to you. If you have more questions to ask or want further clarification from the authors, please feel free to do it.

最终决定

The paper works on language model distillation. The paper is a borderline submisison. All reviewers agree to accept the submission, although with borderline accept or weak accept. The distillation of LLMs is a hot and useful topic of LLM research. Although the novelity of the paper is limited, it provides a lot of empirical studies, which would be valuable for other researchers. Besides, the reviewers' comments can be included in the final version in order to improve the overall papre quality.