It depends on what route you take
If you are privately negotiating to buy the freehold outside the 1993 Act there are no rules regarding costs. It is a matter of agreement between the parties.
If you are proceeding under the Leasehold Reform, Housing and Urban Development Act 1993 you will be responsible for your landlord’s costs. This is generally limited to the legal,valuation costs, transferring the freehold and checking your right to buy the freehold.