SpinTheMic
Pro

Interview practice question

CUDA out of memory error

Machine Learning · Deep Learning · Beginner

Training fails with a CUDA out-of-memory error. What can you do?

What a strong answer covers

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

  • Reduce batch size; use gradient accumulation to keep effective batch size.
  • Mixed precision.
  • Gradient checkpointing.
  • Smaller model or shorter sequence length.
  • Free unused tensors; avoid storing graphs in logs.
Practise this topic

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

See all topics