Legally it looks like you are responsible for the entire duration of the tenancy unless you have a break clause in your contract or can get your Landlord to agree to end your tenancy. However, if you move out and the Landlord signs a tenancy agreement with new tenants, you won't have to continue paying as your tenancy will be over.
https://www.gov.uk/private-renting-tenancy-agreements/how-to-end-your-tenancy