Training machine learning models with GPUs