chapter six
6 Supervised fine-tuning: Maximum expressiveness
This chapter covers
- Training a complete Qwen3-4B model on the IT support dataset using TRL’s SFTTrainer
- Monitoring loss curves and gradient norms to catch problems early
- Evaluating base versus fine-tuned performance with quantitative metrics and behavioral tests
- Deciding when full SFT outperforms LoRA and when it is overkill
- Detecting safety regression after training
In chapter 5, you trained a LoRA adapter that improved your model’s instruction-following ability while updating less than 1% of its parameters. For many tasks, that is enough. But suppose your LoRA-tuned IT support model still produces inconsistent output formats, sometimes returning a numbered list, sometimes a paragraph, sometimes a half-finished sentence. You have tried increasing LoRA rank from 8 to 32, and the improvement has plateaued. The low-rank constraint is limiting how thoroughly the model can reshape its behavior.