If your partners multiples are enough to make him eligible for the total mortgage, the lender will release you from the mortgage and let him take it over. As Dazza said, its much the same as taking a First Charge over the property. The title deeds will then be transferred into his sole name. The lender will make it a condition of his offer that you will no longer have any beneficial rights in the property and (depending on if there is equity on the property and if he decides to take a larger mortgage than the current one) may include a further condition that a certain sum is paid to you. Any such conditions will be on his new offer letter and for him or his solicitor to comply with prior to drawing down the new mortgage.
It was your home also so the repayments made to date wouldn't usually come into the agreement. You will, however, need to agree a fair amount between you if there is equity in the property. This might already be taken care of, if you drew up an agreement prior to buying the property?