LGPLMLJun 17, 2020

Dynamic Tensor Rematerialization

arXiv:2006.09616v4115 citations
Originality Incremental advance
AI Analysis

This addresses memory limitations in training large models, offering a flexible solution for dynamic computation graphs, though it is incremental as it builds on existing checkpointing techniques.

The paper tackles the problem of training deep learning models under memory constraints by introducing Dynamic Tensor Rematerialization (DTR), an online algorithm that frees and recomputes intermediate activations dynamically, achieving comparable performance to optimal static checkpointing with only O(N) tensor operations for an N-layer network.

Checkpointing enables the training of deep learning models under restricted memory budgets by freeing intermediate activations from memory and recomputing them on demand. Current checkpointing techniques statically plan these recomputations offline and assume static computation graphs. We demonstrate that a simple online algorithm can achieve comparable performance by introducing Dynamic Tensor Rematerialization (DTR), a greedy online algorithm for checkpointing that is extensible and general, is parameterized by eviction policy, and supports dynamic models. We prove that DTR can train an $N$-layer linear feedforward network on an $Ω(\sqrt{N})$ memory budget with only $\mathcal{O}(N)$ tensor operations. DTR closely matches the performance of optimal static checkpointing in simulated experiments. We incorporate a DTR prototype into PyTorch merely by interposing on tensor allocations and operator calls and collecting lightweight metadata on tensors.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes