## 3 Methodology
### Hybrid Data Fine-Tuning
Larger values of \(\lambda\) tend to rely more on the direct predictions of the student model for the target language, while smaller values of \(\lambda\) rely more on the guidance of the teacher model. The optimal \(\lambda\) value can be determined by using cross-validation or performance on the validation set. The detailed process is shown in Algorithm 3. The first step involves randomly mixing the annotated data from both the source and target languages. Subsequently, the teacher model is fine-tuned based on this mixed dataset, allowing it to adapt to the target task through back-propagation and parameter updating on the mixed data, as depicted in lines 1-8 of Algorithm 3. Throughout the fine-tuning process using randomly mixed data, the algorithm continually performs knowledge distillation to transfer the cross-linguistic competencies of the teacher model to the student model, thereby enhancing the performance of the student model on the target language, as shown in lines 9-14 of Algorithm 3. In line 13, the _backward_propagation_() function is responsible for computing the gradient of the loss function with respect to the model parameters through backpropagation, enabling weight updates that progressively optimize the model and reduce prediction error. Before backpropagation, the model first performs forward propagation to calculate the output, followed by computing the loss value based on the difference between the predicted output and the actual labels. Since the LightChat model is fine-tuned using a mixed dataset, the loss function may involve multiple tasks. Therefore, the first step of the _backward_propagation_() function is to calculate the loss function for each task, merging them with appropriate task-specific weights. Subsequently, backpropagation computes the gradients. Due to the mixed-data fine-tuning approach, the model processes loss functions for different language data, ensuring that gradients for each task are computed correctly in this step. Task weights may be used to balance the contributions of different tasks to the model's parameter updates. After computing the gradients, the _backward_propagation_() function invokes the optimizer to update the model's weights based on the gradients, aiming to minimize the loss function and thereby enhance model performance. Ultimately, a streamlined student model with exceptional comprehension abilities in computer English can be achieved. ```
1:Initialize teacher_model and student_model by Algorithm 2, _mixed_dataset_ by \(D_{s}\) and \(D_{d}\), _num_epochs_
2:forepoch in range(_num_epochs_) do
3:forbatch in range(_mixed_dataset_) do
4:\(D_{s}(i)\),\(D_{d}(j)\)\(\leftarrow\) batch
5: Calculate \(L_{hybrid}\) by Equation (12)
6: backward_propagation(\(L_{hybrid}\))
7: Update teacher_model
8:endfor
9:forbatch in range(_mixed_dataset_) do
10:\(D_{d}(j)\)\(\leftarrow\) batch
11: Get output teacher_output \(\leftarrow\) teacher_model
12: Calculate \(L_{distill}\) by Equation (13)
13: backward_propagation(\(L_{distill}\))
14: Update student_model
15:endfor
16:endfor
17:return student_model
```  
**Algorithm 3**Hybrid data fine-tuning algorithm