Raw capture — raw/2401.07013v2.md


url: https://arxiv.org/html/2401.07013v2 date_fetched: 2026-07-05 backfilled: true


Knowledge Distillation of Black-Box Large Language Models

Abstract

Given the exceptional performance of proprietary large language models (LLMs) like GPT-4, recent research has increasingly focused on boosting the capabilities of smaller models through knowledge distillation (KD) from these powerful yet black-box teachers. While leveraging the high-quality outputs of these teachers is advantageous, the inaccessibility of their internal states often limits effective knowledge transfer. To overcome this limitation, we introduce Proxy-KD, a novel method that uses a proxy model to facilitate the efficient transfer of knowledge from black-box LLMs to smaller models. Our experiments show that Proxy-KD not only enhances the performance of KD from black-box teacher models but also surpasses traditional white-box KD techniques. This approach presents a compelling new avenue for distilling knowledge from advanced LLMs.

Knowledge Distillation of Black-Box Large Language Models

Hongzhan Chen1, Runjun Chen 1, Yuqi Yi 1, Xiaojun Quan1††thanks:   Corresponding author., Chenliang Li2, Ming Yan2 and Ji Zhang2 1School of Computer Science and Engineering, Sun Yat-sen University, China 2Alibaba Group, China 1chenhzh59@mail2.sysu.edu.cn, quanxj3@mail.sysu.edu.cn 2ym119608@alibaba-inc.com

1 Introduction

Recently, proprietary large language models (LLMs) like GPT-3.5 (OpenAI, 2022) and GPT-4 (OpenAI, 2023) have demonstrated significant superiority over open-source counterparts such as the Llama series (Touvron et al., 2023a, b; MetaAI, 2024). However, their vast number of parameters leads to high inference costs, and they are only accessible via API calls, offering limited customization and transparency. To address these challenges, recent efforts like Alpaca (Taori et al., 2023), Vicuna (Chiang et al., 2023), and Orca (Mukherjee et al., 2023) have focused on transferring the capabilities of proprietary LLMs to smaller open-source models through knowledge distillation (Chen et al., 2023; Hsieh et al., 2023; Ho et al., 2022).

Knowledge distillation (KD) (Hinton et al., 2015) is a technique used to enhance the performance of a smaller student model by learning from a larger, more sophisticated teacher model. Depending on the level of access to the teacher model’s internals, KD methods can be categorized into two types: KD with black-box teachers and KD with white-box teachers. As illustrated in Figure 1, white-box KD allows the student model to distill more intrinsic knowledge from the teacher by mimicing the teacher model’s output distribution (Gu et al., 2023; Wen et al., 2023), hidden states (Jiao et al., 2020; Sun et al., 2019), and attention scores (Wang et al., 2021). Therefore, this method can only be applied when the teacher model’s parameters are accessible. On the other hand, black-box KD leverages the high-quality outputs from powerful proprietary LLMs to fine-tune the student model (Hsieh et al., 2023; Fu et al., 2023). Both white-box and black-box KD have their respective drawbacks. While white-box KD is hindered by the limited capacity of the teacher model, which often restricts the distillation performance of the student, black-box KD faces challenges with knowledge transfer due to the inaccessibility of the teacher model’s output distribution and internal states.

In this paper, we propose Proxy-based Knowledge Distillation (Proxy-KD) to better transfer knowledge from black-box teacher models. Proxy-KD introduces a proxy model, typically a white-box LLM, between the student and the black-box teacher. The proxy model first aligns with the capabilities of the black-box teacher by leveraging the teacher’s outputs. Moreover, preference optimization is performed to further refine and enhance the alignment between the proxy and teacher models.

During the knowledge distillation process, the proxy model generates a dense distribution that closely approximates the black-box teacher’s output distribution. This enables the student model to train effectively as if it were using the black-box teacher’s guidance. To further improve the student’s learning effect, we propose incorporating a sample-level weight into the distillation objective. This weight reflects the quality of alignment between the proxy and the teacher model for each sample, allowing the student to concentrate on learning well-aligned distributions from the proxy. Moreover, the outputs from the black-box teacher serve as pseudo-labels for the supervised fine-tuning of the student model, akin to traditional white-box knowledge distillation. Introducing the proxy model also mitigates the model capacity gap issue (Cho and Hariharan, 2019), which typically occurs when there is a notable disparity in capabilities between the teacher and the student.

To validate the effectiveness of our method, we conducted comprehensive experiments across a range of well-established benchmarks. The results show that Proxy-KD consistently outperforms both black-box and white-box KD methods. We observed that the alignment between the proxy model and the black-box teacher is crucial; a poorly aligned proxy model significantly diminishes the performance of knowledge distillation. We also found that larger and more robust proxy models are generally more desirable, as they possess stronger foundational capabilities and can align more effectively with the black-box teacher, enhancing the distillation process. Furthermore, we discovered that directly fine-tuning the proxy model with outputs from the black-box teacher is suboptimal for the alignment, requiring more effective alignment methods. These findings highlight the importance of selecting a well-aligned and capable proxy model to fully leverage the benefits of Proxy-KD.

We summarize our contribution as below:

2 Related Work

Existing knowledge distillation methods can be categorized into white-box knowledge distillation and black-box knowledge distillation.

2.1 White-Box Knowledge Distillation

Traditional knowledge distillation (KD) research predominantly employs white-box teachers and is typically classified into three main branches: feature-based, response-based, and relation-based methods. Feature-based methods seek to replicate the teacher’s intermediate representations, such as attention scores (Jiao et al., 2020), attribution maps (Wu et al., 2023), and hidden representations of tokens (Sun et al., 2019). Response-based methods train the student model by minimizing divergences like Kullback–Leibler (KL) divergence (Hinton et al., 2015; Sanh et al., 2019), reverse KL (Gu et al., 2023; Wen et al., 2023), Jensen–Shannon Divergence (JSD) (Fang et al., 2021; Yin et al., 2020), and Total Variation Distance (TVD) (Wen et al., 2023) based on the teacher’s output distribution. Relation-based methods train the student model by learning pairwise distances and triple-wise angles among token representations from the teacher (Park et al., 2021), or extracting structural relations from multi-granularity representations (Liu et al., 2022).

2.2 Black-Box Knowledge Distillation

Given the remarkable performance achieved by proprietary LLMs like GPT-4 (OpenAI, 2023), Claude 3 Anthropic (2024), and Gemini (Team et al., 2023), recent studies like Alpaca (Taori et al., 2023), Vicuna (Chiang et al., 2023), and Orca (Mukherjee et al., 2023) have focused on transferring diverse capabilities from these black-box teachers into smaller open-source models. For instance, Li et al. (2024) and Liu et al. (2023) improved the mathematical capability of small models by training on tailored rationale samples generated by GPT-3.5-Turbo and GPT-4. To transfer the code generation capability, Azerbayev et al. (2023) prompted Codex (Chen et al., 2021) to create natural language-code pairs and fine-tuned a smaller model on these samples. To transfer the tool usage capability, Gou et al. (2023) utilized GPT-4 to generate interactive tool-use trajectories as training samples for the target model. Other approaches, such as Hsieh et al. (2023); Ho et al. (2022); Chen et al. (2023), utilize rationales generated by black-box teachers as training data to transfer their general reasoning capabilities.

White-box knowledge distillation (KD) efficiently distills knowledge by leveraging the internal states of the teacher model. However, white-box teachers typically possess a more limited capacity compared to their black-box counterparts. In contrast, black-box KD capitalizes on the superior performance of the teacher models but is restricted to fine-tuning on teacher-generated samples. This approach captures input-output patterns without accessing the deeper, intrinsic knowledge of the teacher model. To bridge these gaps, we propose Proxy-KD, a straightforward method that combines the strengths of both white-box and black-box KD while mitigating their respective limitations.

2.3 Connection with Teacher Assistant

The proposed Proxy-KD method draws inspiration from TAKD (Mirzadeh et al., 2020), as both methods use an intermediate network to aid knowledge distillation, but they differ in three significant ways. Firstly, the motivation behind each approach is distinct: TAKD focuses on mitigating the capacity gap between the teacher and student in white-box settings, whereas Proxy-KD addresses the challenges posed by black-box teacher models and seeks to incorporate the benefits found in white-box scenarios. Secondly, the methodologies diverge, with Proxy-KD introducing a crucial proxy alignment phase that includes preference optimization to better align the proxy model with the black-box LLM. This step is essential for reducing discrepancies between the proxy and teacher models, thereby improving the effectiveness of the distillation process. Lastly, they operate in different domains: TAKD is applied in the field of computer vision, while Proxy-KD is specifically designed for natural language processing, targeting the distillation of proprietary large language models (LLMs).

3 Method

In this section, we introduce Proxy-based Knowledge Distillation (Proxy-KD), a simple yet efficient approach for knowledge distillation from black-box LLMs. As illustrated in Figure 2, Proxy-KD introduces a larger white-box LLM as the proxy aiming to capture the black-box teacher’s knowledge. The process unfolds in two main stages: (1) proxy model alignment and (2) student knowledge distillation. First, the proxy model is aligned with the teacher through supervised fine-tuning and preference optimization. Once aligned, the student model learns from both the explicit outputs (hard labels) of the black-box teacher and output distributions (soft labels) provided by the aligned proxy.

3.1 Problem Statement

To facilitate the transfer of knowledge from a black-box teacher LLM to a smaller, open-source student LLM , we introduce a proxy model . The training dataset consists of input-output pairs , where represents the input prompt and is the output sequence generated by the teacher model . This dataset is strategically divided into three parts: 10% () for the warm-up phase, 45% () for aligning the proxy model with the teacher, and the remaining 45% () for the knowledge distillation training of the student model.

The process begins with a warm-up phase where the proxy model is trained on . This phase helps develop a basic capability to generate responses to input prompts. Following this, the proxy model undergoes alignment with the teacher model using the next dataset, . This alignment is achieved through two methods: hard-label knowledge distillation (KD) and preference learning. These methods enable to approximate the behavior and outputs of the teacher model. Once aligned, acts as an intermediary, facilitating the transfer of knowledge to the student on .

3.2 Preliminary

Hard-Label Knowledge Distillation.

In this approach, the student model is trained using the outputs generated by the teacher model by minimizing the negative log-likelihood (NLL) function:

| (1) |

where is the probability of generating given . This approach is essentially a form of supervised fine-tuning and typically employed when the teacher is a black-box model.

Soft-Label Knowledge Distillation.

In this approach, the student is trained to imitate the token-level probabilities of the teacher, by minimizing the Kullback-Leibler (KL) divergence:

| (2) |

This knowledge distillation approach is typically employed when the teacher is a white-box model.

While the KL divergence objective provides richer supervision signals by using the token-level output distributions of the teacher model, it cannot be applied to black-box teachers due to the inaccessibility of these distributions. Consequently, current methods (Chiang et al., 2023; Mukherjee et al., 2023) rely on supervised fine-tuning using the outputs generated by black-box models to transfer their knowledge. Proxy-KD addresses this limitation by using a proxy model to incorporate the KL objective. The proxy mimics the black-box teacher, allowing access to its output distributions and enabling a more effective knowledge transfer.

3.3 Proxy Model Alignment

The proxy model is typically a larger white-box LLM than the student model . For effective knowledge transfer, it’s crucial to first align the output distribution of the proxy model with that of the black-box teacher model . This alignment ensures that the proxy accurately captures the teacher’s behavior.

The proxy model first undergoes supervised fine-tuning on a warm-up dataset . Following this, the proxy is further trained on the dataset by minimizing the NLL loss:

| (3) |

To enhance the alignment of the proxy model with the teacher, we further introduce a preference learning-based alignment objective, with the hypothesis that the teacher model’s responses are of higher quality compared to those from the unaligned proxy model. The objective is to iteratively adjust the proxy model so that it increasingly favors responses similar to those of the teacher while reducing its preference for its own initial outputs. To implement this, we employ the Direct Preference Optimization (DPO) algorithm (Rafailov et al., 2024), which refines the proxy model by systematically preferring the teacher’s responses.

Specifically, for a given input , we iteratively sample a response from the teacher and from the proxy. These responses form a preference pair . To train the proxy model to prefer over , we define the following preference loss function:

| (4) | ||||

where is the proxy model from the previous training iteration. The overall preference loss over all the preference samples is defined as:

| (5) |

At each iteration , the proxy model is updated based on the combined objective that includes both the NLL loss and the preference loss:

| (6) |

This iterative process continues for a fixed number of iterations or until the proxy model converges. Through this method, the proxy model is aligned to emulate the distribution of the black-box teacher , becoming an effective intermediary for transferring knowledge to the student model.

3.4 Knowledge Distillation

To transfer knowledge from the black-box teacher to the student model , we define the first training objective using teacher-generated sequences and the hard-label knowledge distillation objective:

| (7) |

Based on the proxy model aligned with the black-box teacher, which delivers accessible output distributions, we define another training objective for the student through soft-label knowledge distillation:

| (8) |

In this process, the proxy model functions as an intermediary for the black-box teacher, facilitating the transfer of knowledge to the student model. However, as illustrated in Figure 5 in Appendix, discrepancies between the teacher’s and the proxy’s output distributions persist even after aligning the proxy model, potentially degrading the effectiveness of knowledge distillation. To address these discrepancies, we propose a weighted approach to the soft-label knowledge distillation objective. By introducing weights, we dynamically adjust the influence of each sample based on the alignment quality between the proxy and the black-box teacher. This approach ensures that the student model prioritizes samples where the proxy’s distribution closely matches the teacher’s distribution and reduces focus on samples where it does not. The weights are calculated based on the log-likelihood of the teacher’s output generated by the proxy, normalized by the mean and variance of these log-likelihoods:

| (9) | ||||

where is a weight reflecting the quality of the proxy’s prediction for the sample , is the variance operation, is the standard deviation, is the sigmoid function. Based on Equation (8), we derive the sample-level weighted version of as follow:

| (10) | ||||

Therefore, the overall objective for student knowledge distillation can be derived as:

| (11) |

where is a hyperparameter utilized to adjust the strength of the weighted KL loss.

This knowledge distillation strategy effectively blends the advantages of both black-box and white-box knowledge distillation methods, employing the proxy model to bridge the gap between black-box LLMs and open-source student LLMs.

4 Experimental Setup

In this section, we introduce the experimental settings of models, datasets, and method baselines.

4.1 Models and Datasets

Teacher/Proxy/Student Models. In Proxy-KD, we choose GPT-4 (OpenAI, 2023) as the teacher, which is a powerful proprietary large language model. We select Llama-2-70b (Touvron et al., 2023b) and Llama-2-13b (MetaAI, 2024) as the proxy, respectively. Our student models come from two model types: Llama-1-7B (Touvron et al., 2023a) and Llama-2-7B (Touvron et al., 2023b).

Training Corpus.

We combine the OpenOrca (Lian et al., 2023) and Nectar (Zhu et al., 2023) datasets as our training corpus, containing a total of 1M output sequences generated by the block-box teacher GPT-4. The OpenOrca dataset consists of instruction-following tasks, where GPT-4 is prompted to generate responses based on diverse input instructions. Nectar is a 7-wise comparison dataset, we filter and select those responses derived from GPT-4. Following Li et al. (2024), we also incorporate synthetic data generated by GPT-4, based on existing benchmark training sets. We split the original training corpus into three parts: 10% as with 100K samples, 45% as with 450K samples, and 45% as with 450K samples.

Evaluation Benchmarks.

Evaluation benchmarks include complex reasoning dataset BBH (Suzgun et al., 2022), knowledge-based datasets AGIEval (Zhong et al., 2023), ARC-challenge (Clark et al., 2018), and MMLU (Zeng, 2023), commonsense reasoning dataset CSQA (Talmor et al., 2019), and mathematical reasoning dataset GSM8K (Cobbe et al., 2021). All evaluated models apply a zero-shot greedy decoding strategy.

4.2 Training Configurations

All experiments are conducted on 8×A100 Nvidia GPUs with 80GB memory. All proxy and student models are trained for only one epoch. We use a constant learning rate of 1e-5 and the Adam optimizer, with a max sequence length of 1024. We set hyperparamter in Equation (11), and for the number of proxy alignment iterations. All models are trained using LoRA (Hu et al., 2021) with mixed-precision: frozen parameters in bfloat16 and LoRA-trained parameters in float32.

4.3 Baselines

We compare Proxy-KD with different white-box KD and black-box KD methods.

White-Box KD. For knowledge distillation with white-box teachers, we compare forward KL methods (Hinton et al., 2015; Agarwal et al., 2024) and reverse KL methods including MiniLLM (Gu et al., 2023) and GKD (Agarwal et al., 2023) (with the same hyperparameters set in the paper.). The chat version of Llama-2-70b is utilized as the white-box teacher. We also compare with using the aligned proxy as white-box teacher to perform distillation.

Black-Box KD. For knowledge distillation with black-box teachers, we compare the vanilla black-box KD methods (Mukherjee et al., 2023; Mitra et al., 2023; Xu et al., 2023), which directly fine-tunes the student on the data generated by the black-box teacher. We also compare Proxy-KD with the TAKD (Mirzadeh et al., 2020) method.

For baselines implemented by us, we start from the same student checkpoint as Proxy-KD and use the same input prompts. In white-box KD, output sequences are generated by the white-box teacher, while in black-box KD, output sequences are generated by the black-box teacher.

5 Result and Analysis

In this section, we present the main results and additional experiments of Proxy-KD.

5.1 Overall Results

We show the comparison of Proxy-KD against baselines in Table 1, the proxy models in Proxy-KD are based on Llama-2-70B backbone. Overall, the performance of black-box KD methods outperforms that of white-box KD methods, demonstrating the efficacy of distilling knowledge from powerful black-box models.

Proxy-KD outperforms white-box KD and black-box KD methods. Notably, Proxy-KD further enhances the performance, consistently achieving higher scores across most evaluated benchmarks compared to the white-box KD methods (e.g. MiniLLM and GKD) and the black-box KD methods. Improvement is particularly pronounced in the challenging datasets like BBH and GSM8K, where Proxy-KD obtains scores of 53.40 and 53.07, respectively, outperforming even larger models trained using traditional black-box KD methods.

Proxy-KD outperforms TAKD consistently. TAKD performs even worse than vanilla Black-Box KD. When using Llama-1-7B as the student, vanilla Black-Box KD achieves an average of 49.11%, while TAKD only reaches 46.63%. Similarly, with Llama-2-7B as the student, vanilla Black-Box KD attains 53.66% compared to TAKD’s average of 52.82%. This decline in performance is likely due to TAKD’s failure to account for the proxy alignment process, which is essential for effective closed-source KD. Introducing an unaligned proxy not only fails to enhance performance but actually degrades the performance of the student model.

Proxy-KD outperforms white-box KD with an aligned proxy as the teacher. Relying solely on an aligned proxy for white-box KD offers limited knowledge to the student. This suggests that the capabilities of closed-source teachers are more beneficial than those of open-source teachers, even after alignment, underscoring the superiority of distilling from closed-source LLMs.

We also present the performance changes of student models during the distillation process in Figure 6 in Appendix. We show the accuracy curves of students on the benchmark test sets for every 40K training steps. We compare three methods: vanilla black-box KD, Proxy-KD, and white-box KD (forward KL). The results show that Proxy-KD stands out with the most significant enhancements, indicating its superior capability to efficiently transfer the comprehensive knowledge of black-box teachers to student models. The steeper and more consistent improvement curves of Proxy-KD across benchmarks such as AGIEval, ARC, and particularly in complex tasks like BBH and GSM8K, underscore its robust and effective approach in leveraging proxy models for knowledge distillation.

5.2 Ablation Studies

In this section, we examine the impact of different components within Proxy-KD. Llama-2-7B and Llama-2-70B are utilized as the backbones of the student and the proxy models, respectively.

Effect of the Proxy Model. The proxy model is crucial for the effectiveness of Proxy-KD. Removing the proxy model forces the distillation process to revert to hard-label knowledge distillation, leading to significant performance drops across multiple benchmarks: a decrease of 4.24 on ARC, 6.72 on BBH, and 3.56 on GSM8K, as shown in Table 2. These declines underscore the proxy model’s essential role in capturing and transferring the distributional knowledge from the black-box teacher, which is particularly important for tasks involving complex reasoning and mathematical challenges. Without the proxy, the student model fails to benefit from the detailed distributional guidance, resulting in markedly lower performance.

Effect of Proxy Model Alignment. The proxy model alignment, facilitated by the loss , is vital for effective knowledge transfer. Table 2 shows that when the proxy is initialized directly from the Llama-2-70B checkpoint without alignment, the performance drops notably on BBH (-10.40), GSM8K (-5.53), and MMLU (-3.26). This decline illustrates the adverse effect of an unaligned proxy, which fails to approximate the teacher’s distribution and consequently underperforms compared to models directly fine-tuned on teacher data. The slight increase on CSQA (+0.86) when skipping alignment might be attributed to the simplicity of the task, indicating potential overfitting to teacher outputs without proxy guidance. This reinforces the necessity of the alignment process to ensure the proxy effectively bridges the knowledge transfer from the black-box teacher to the student model across diverse and complex tasks.

Effect of Preference Optimization. Table 2 illustrates the significant role of preference optimization in enhancing the performance of both the proxy and student models. When the proxy preference loss is removed, reducing the proxy alignment loss to , we observe notable performance drops across various benchmarks. Specifically, the alignment of the proxy model with the black-box teacher deteriorates, as evidenced by decreases in scores on benchmarks like BBH and MMLU, which subsequently impacts the student model. The overall trend confirms that preference optimization is crucial for refining the proxy model’s ability to emulate the teacher effectively.

Effect of Weighted KL. When is replaced with the standard KL loss , we also observe declines in performance across most benchmarks, indicating that the effectiveness of the distillation process diminishes. The results shown in Table 2 highlight that focusing on high log-likelihood distributions from the proxy, as facilitated by the weighted KL loss, significantly enhances the quality of knowledge transfer. The overall declines underscore that this weighting mechanism significantly improves the quality of knowledge distillation, enhancing the student’s ability to learn from a well-aligned proxy.

5.3 Impact of Proxy Model’s Capability

How well the proxy aligned with the teacher can directly affect the performance of the student. The final alignment effectiveness of the proxy model depends on two factors: the design of the alignment algorithm and the inherent alignment capability of the proxy backbone model itself. In this section, we investigate the impact of the latter. We hypothesize that the size of the proxy model’s parameters is crucial for its capacity to align with the black-box teacher’s capability, especially when the teacher’s parameter size is significantly larger than the proxy’s. Experiments are conducted with Llama-2-70B and Llama-2-13B as the proxy backbone models. We show the performance of these aligned proxy models. As depicted in Figure 3, the proxy model based on Llama-2-70B performs better than the one based on Llama-2-13B, the latter has fewer parameters. We also examine the impact of proxy models with different capacities on student performance. We observe that the stronger proxy based on Llama-2-70B yields better student performance than the weaker proxy based on Llama-2-13B. Furthermore, when using a proxy based on a backbone model with a larger capacity, the student demonstrates a greater potential for achieving higher performance.

6 Conclusion

This paper aims to tackle the challenge of knowledge distillation for black-box large language models (LLMs), where we can only access the outputs generated by the teacher model. Given the inaccessibility of the internal states of these black-box models, we introduce Proxy-KD, a novel approach that leverages a proxy model to enhance the distillation process. The proxy model is first aligned with the black-box teacher, closely mimicking its behavior. Then, the student model is trained using the combined knowledge from both the black-box teacher and the proxy model. Extensive experiments and analyses across a variety of well-established benchmarks demonstrate that Proxy-KD significantly outperforms existing black-box and white-box knowledge distillation methods.

Limitations

The limitations of this work include the training time overhead associated with proxy model alignment, particularly when the proxy model has a large number of parameters. Additionally, the proposed preference optimization requires online sampling from the proxy model, further increasing the training time overhead. Another limitation is the type of experimental backbone models used. Due to resource constraints, this work only conducts experiments with the Llama model series, without including other model backbones such as Qwen (Bai et al., 2023) or Mistral (Jiang et al., 2023).

References

Appendix A Experimental Analysis

A.1 Analysis of Training Efficiency

We show the training time overhead for different methods in Table 3. We show the training hours per round for supervised fine-tuning, knowledge distillation, and preference optimization methods across various model sizes. Each round contains 40K training samples. We note that preference optimization is the main time overhead due to online sampling from the proxy model. In Proxy-KD, we obtain the proxy model’s output distribution offline during student distillation. As Figure 4 shows, most probability mass is concentrated on a few tokens. To save memory, only the top 10 token indices and their logits are retained.

A.2 Output Token Agreement

To serve as a stand-in for the teacher model’s output distribution, it’s important for the proxy model’s output to align with the teacher model’s output distribution, which is achieved through proxy model alignment. We measure the change in agreement between the top-1 token given by the proxy and the token provided by teacher in current step, before and after alignment. To visualize this alignment, at each step, consider the top-1 token given by the proxy’s output distribution and the token given by the teacher. If the top-1 token given by the proxy matches the token given by the teacher at the current step, it is considered a match; otherwise, it is considered a mismatch. As shown in Figure 5, We find that after the proxy model alignment, the matched portions show a significant upward trend, indicating a trend towards alignment.

A.3 Additional Results

We present the performance changes of student models during the distillation in Figure 6 and 7. The student models are based on Llama-2-7B and Llama-1-7B backbone, and the proxy models are based on Llama-2-70B backbone. We test the accuracy of students on benchmarks for every 20K training steps. We compare Proxy-KD with vanilla black-box KD method and white-box KD method (Forward KL with Llama-2-70b-chat as white-box teacher) . We observe Proxy-KD consistently outperform vanilla black-box KD and white-box KD.