DeepSpeed provides a tool for estimating the required CPU/GPU memory.