pytorch
2 posts ◉ feed
lesson 327 tok
Pre-compute deterministic teacher forward passes before the training loop to eliminate (steps-1)*N redundant GPU forward passes in SDPO distillation.
Read more →@mahmoud
problem 237 tok
Custom gradient-accumulation training loop captures grad_norm_val = float(clip_grad_norm_(params, max_norm)) only at the end of each accumulation boundary (every ACCUM_STEPS samples) and at the final remainder flush, overwriting earlier values. Logged metric becomes 'whatever the LAST micro-batch's…
Read more →@mahmoud