If you have replacements, then either write a new lease and void the old one, or you can write a sublease provision with replacing two of the tenants.
I had a similar situation sometime ago. I allowed the new people, after a background check to take the place of the ones that wanted out. The folks that wanted out gave up their part of the security deposit to the remaining tenant. I'm not going to say that 100% of the time if people want out it's best to let them go and just keep their security deposit but the time and funds lost in trying to hold them accountable for the remainder of the lease needs to be considered.
@David Brenneman did you do a walk through to asses the property? I don't want to have a situation where a year from now the tenants who stay say damage is from the tenants who left.
No I put that on the remaining party to settle out, I made sure they understood that they would be held accountable regardless of who may have caused the damage. A walk though may not be a bad idea but I'd like to avoid being the referee if possible and in this case it was possible. For me it worked out for the best as the remaining tenant has been there for four years.
I also modified the lease to capture the names of the new folks but left the time remaining the same as before the change.