MPS out of memory problem

Hello I am a novice developer and I am trying to train my model on the mac m1 using mps but I don’t know how to avoid the MPS out of memory error. There are no methods like empty_cache() in mps, can you please help me with this, I don’t know who to contact. I will be glad for your support and thank you very much for such a wonderful framework