He will likely stay in until after Super-Tuesday if it looks like he might pick up some delegates. Then he will try and use those delegates to negotiate a nice appointment in the administration of whoever wins the nomination. Of course that only works out if the Republican candidate can win the Presidency.
I'm still thinking that Rudy might like to be Attorney General or Secretary of Homeland Security.
And I believe that such an appointment would be a good fit for all involved.