Files
foxhunt/crates
jgrusewski 9f5b7b58d4 perf: eliminate 86ms/step PER double-sample + guard overhead
Three performance optimizations targeting the 15.6s/epoch training:

1. Single write lock for sample+step (was: read lock → sample → release
   → write lock → step → release = 43ms lock contention per step)
2. Vaccine batch sampled only when needed (every 10th step, not every
   step — saves 43ms on 90% of steps)
3. Training guard runs every 5th step instead of every step (12ms/step
   → 2.4ms/step amortized). NaN/loss checks persist across steps.
4. Causal intervention interval 10→50 (14 forward passes less often)
5. Removed all remaining H100_DIAG tracing::info in training_loop

Expected impact: ~86ms → ~43ms sample, ~12ms → ~2.4ms guard = ~52ms/step
savings = ~3.6s/epoch → target ~12s/epoch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:37:47 +02:00
..