The Harder The Better: Maintaining Supervised Fine-tuning Generalization with Less but Harder Data