AI Hardware & Software Stack

Which describes gradient checkpointing (activation recomputation) used in training?

  1. AStore only some intermediate forward results and recompute the rest when needed during backpropagation, trading extra computation for less memory
  2. BSaving model weights to disk partway through training
  3. CTraining without computing gradients
Show answer and explanation

Answer: A. Store only some intermediate forward results and recompute the rest when needed during backpropagation, trading extra computation for less memory

Backpropagation needs each layer's intermediate forward results, but storing them all makes memory grow with layer count and batch size. Gradient checkpointing stores results only every few layers, and when backpropagation reaches a segment it reruns the forward pass from the saved point to regenerate the needed values. At the cost of roughly one extra forward pass, activation memory is greatly reduced.

  • A. Correct. It is commonly used when memory runs short.
  • B. It is different from saving training checkpoints.
  • C. Gradients are still computed.
Practice this topic Back to topic

More AI Hardware & Software Stack questions

  1. What is the main reason systolic arrays in AI accelerators compute matrix products efficiently?
  2. Why do some AI accelerators include large on-chip SRAM (tens to hundreds of MB)?
  3. Which describes the "weight-stationary" dataflow used in AI accelerators?
  4. Which is NOT an advantage of running AI inference on the device itself (at the edge), such as a smartphone, rather than on cloud servers?
  5. Why are the NPUs in smartphone SoCs more power-efficient than CPUs for AI inference?