Unfortunately, you cannot. If the police are given cause to search the property and they find the drugs, they will likely arrest everyone present and on the lease unless the drugs are blatantly found in a roommates personal space (under pillow, personal closet or bed). Unless you want to narc out your roommates, you just need to stay away from them and ride out the last 4 months. Good Luck.
As the previous atty stated, you cannot completely protect yourself. However, you should insist that no drugs or accessories are in any common areas-living room, kitchen, etc.--but are kept only in private bedrooms. If those bedrooms lock, they should keep them locked and be sure you don't have a key or access. Insist that no one uses drugs in your presence or in common areas. If there are telephone calls relating to sale/purchase of drugs, do not take those calls and do not agree to relay messages to your roommates. Do not allow any such transactions to take place in the apartment. Do not give your roommates rides in your car or accept rides from them for any purpose. Do not do anything that could be perceived as assisting in drug transactions, however small. Then, when you can, move out.
This answer is provided for educational purposes only and is not intended as the practice of law in any jurisdiction in which I am not licensed. The answer does not constitute legal advice nor does it create an attorney-client relationship. The answer is based only on the information provided, and may be inaccurate in the context of additional facts that have not been provided. The questioner should be aware that I am only licensed to practice law in the state and federal courts of Minnesota. Accordingly, before taking any action or refraining from taking any action, the questioner should consult with an attorney licensed to practice in his or her jurisdiction.
Whatever you do is going to cost money. If you inform the landlord they may be kicked out but you are stuck with the lease payments. if you leave you have to put down new security and may be sued. You can defend but it costs. I would inform the landlord and leave. If the place gets busted you will be charged with them.