The overview of Fault-Guided Fine-Tuning
- Generate the dataset using the following command:
cd Generate
python generate_bad.py
python get_datat.py
- Train the model using the following command:
cd Train
python train_new.py
--n_trials 1
--model_name_or_path model_path
--train_data_path dataset_path
--output_dir output_dir
--diff_level line
--hybrid true
--learning_rate 5e-6
--warmup_steps 5
This example demonstrates how our teacher model generates plausible but incorrect code implementations. The problem requires sorting an array in ascending order, and the teacher model produces code that shows understanding of the sorting concept but contains a subtle error. The incorrect implementation uses \textit{arr.sort()}, which sorts the list in-place but returns None, instead of \textit{sorted(arr)}, which returns a new sorted list. These nuanced examples help models learn to distinguish \textit{error-sensitive segments} to boost their code generation performance.
