SpinTheMic
Pro

Interview practice question

Fixing a PyTorch CUDA OOM crash

Machine Learning · ML Frameworks · Beginner

Your training crashes with "CUDA out of memory". How do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Reduce batch size; gradient accumulation.
  • Mixed precision.
  • Gradient checkpointing.
  • Avoid keeping tensors with graphs (loss history).
  • Clear cache; smaller model or sequence length.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics