What strategies do you use to optimize memory footprint and computational efficiency during model training and inference?