If you're going to end up paying market rate anyway, why not just skip the training cost and hire them after someone else has put in the hard yards?
Maybe by creating a workplace where developers want to stay you could keep them around at slightly under market rate? Not everyone is looking to job hop every 6 months. But the amount below market rate that you seem to end up by staying in one job feels like it's unreasonably large.