Files
foxhunt/crates
jgrusewski 5aad1eb846 feat(ml-alpha): PerceptionV2State bundle (axes A+B+C+D+E) [V9]
Bundles all v2 components into one cohesive trainer field that
PerceptionTrainer wires through in V10. Owns:

  (C) horizon_tokens + Q for the horizon-token attention pool
       + per-batch grad scratches + 2 AdamWs
  (E) inverted attention pool + saved attn + d_scores scratch
  (D) MoE gate weights + experts (W, b) + per-batch sparse-by-expert
       grad scratches + 3 AdamWs + top_e / gate_probs / aux_loss
  (A) log_sigma_h per-horizon Kendall scalar + AdamW (0.25× LR)
  (B) AnchorController (Wiener-α host-side) + anchor_l2 kernel +
       init snapshots of horizon_tokens, Q, experts_w, experts_b
       for the L2 anchor

Init scale: 1/√HIDDEN_DIM Xavier for horizon_tokens/Q/experts_W;
zeros for experts_b and log_sigma_h. Anchor controller bootstrap
uses ‖horizon_tokens_init‖₂ + ‖Q_init‖₂ + their total numel to
derive the signal-driven floor (no tuned constants).

zero_grads uses memset_zeros only — capture-safe.

Compile-clean. V10 wires this state into perception.rs::step_batched
forward / backward / AdamW.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 14:28:50 +02:00
..