Gradient Accumulation / Tích lũy Gradient
📖 Gradient Accumulation
Definition (English):
Gradient accumulation simulates larger batch sizes by accumulating gradients over multiple forward-backward passes before performing a parameter update. This enables training with large effective batch sizes when GPU memory is insufficient for the desired batch size. If effective batch = 32 but GPU fits only 8, accumulate gradients for 4 steps then update. The result is mathematically equivalent to using the full batch.
📖 Tích lũy Gradient
Định nghĩa (Tiếng Việt):
Tích lũy gradient mô phỏng batch size lớn hơn bằng cách tích lũy gradient qua nhiều lần lan truyền xuôi-ngược trước khi thực hiện cập nhật tham số. Điều này cho phép huấn luyện với batch size hiệu quả lớn khi bộ nhớ GPU không đủ cho batch size mong muốn. Nếu batch hiệu quả = 32 nhưng GPU chỉ vừa 8, tích lũy gradient 4 bước rồi cập nhật. Kết quả tương đương toán học với sử dụng batch đầy đủ.
📂 Phân loại: Training
HỆ SINH THÁI CiCC