引导式测验 · 中等 等级
梯度检查点测验
解释激活重新实现、内存节省、与计划相关的计算开销以及与分片和混合精度的组合。
问题 1 的 8
为了节省内存,梯度检查点主要交换什么?
预览每个问题8 问题
当您参加测验时,就会出现答案和解释。
- 为了节省内存,梯度检查点主要交换什么?
- 额外计算(重新计算)以减少内存使用
- 速度模型精度
- 网络带宽的磁盘空间
- 批量精度
- 为什么激活通常在前向传递过程中存储?
- 将它们显示给用户
- 因为反向传播需要它们来计算梯度
- 加快数据加载速度
- 它们从来都不是真正需要的
- In a simplified chain of N similarly sized layers, what can checkpoint boundaries spaced about sqrt(N) layers apart achieve in the textbook schedule?
- It stores no activations and performs no recomputation
- It guarantees constant memory for every model graph
- Activation storage can scale on the order of sqrt(N) checkpoints
- It makes optimizer-state memory scale as sqrt(N)
- What most determines gradient-checkpointing runtime overhead in a practical model?
- Only the model’s file extension
- A fixed 20–30% slowdown for every model
- The number of labels in the dataset
- Which operations are recomputed, checkpoint placement, graph structure, and hardware
- 在 PyTorch 中,哪个实用程序通常用于将梯度检查点应用于模块?
- torch.utils.checkpoint
- 火炬优化SGD
- torch.nn.Dropout
- torch.cuda.empty_cache
- What happens to operations inside a checkpointed region during backward?
- Their gradients are skipped entirely
- Their forward computations are rerun to regenerate needed activations
- Their weights are permanently discarded
- They are executed only during inference
- Which training techniques can be combined with activation checkpointing to reduce different memory costs?
- Only increasing the number of labels
- Turning off backpropagation
- FSDP for sharded model state and mixed precision for lower-precision tensors
- Replacing the model with a tokenizer
- What is selective activation checkpointing intended to choose?
- Which training labels are removed
- Which model outputs are published
- Which GPU becomes the tokenizer
- Which operations to save and which to recompute based on their memory and runtime costs