Ask a landlord-tenant lawyer and get answers ASAP
by contract you mean lease? have you raised it with landlord to get out?
have you asked to be released? what is landlord position? has landlord breached the lease in any way?
awaiting your reply.
can you negotiate an early penalty? 2-3 months is common?
can you sublet for the balance of the lease or find a replacement tenant? - either through a broker or with aid of owner?
I wish I could tell you that you can just cancel, but that would be wrong information, I hope you understand.
Please let me know then if the answer is acceptable - even if its not the answer you wished for.