PURPOSE: This phase I/II trial is studying the side effects and best dose of intensity-modulated radiation therapy (IMRT) when given together with etoposide and cyclophosphamide followed by donor stem cell transplant and to see how well they work in treating patients with relapsed or refractory acute lymphoblastic leukemia (ALL) or acute myeloid leukemia (AML).