perf: vaccine every 20th step (was 10th) — same regularization, half the cost

This commit is contained in:
jgrusewski
2026-04-08 01:54:38 +02:00
parent f1e53797ca
commit 6baedf9b4b

View File

@@ -769,7 +769,7 @@ impl FusedTrainingCtx {
}
}
// Gradient vaccine (1/10 steps).
if self.steps_since_varmap_sync % 10 == 0 {
if self.steps_since_varmap_sync % 20 == 0 {
if let Some(ref vaccine_batch) = self.pending_vaccine_batch {
if let Err(e) = self.trainer.apply_gradient_vaccine(vaccine_batch) {
tracing::debug!("Gradient vaccine failed, restoring grad_buf: {e}");