Files
foxhunt/crates
jgrusewski 617b9fb718 feat: attention backward pass Phase A (residual passthrough)
Add backward_residual() method to GpuAttention that implements
gradient flow through the residual connection for frozen attention
weights. This is Phase A of the attention backward implementation.

The residual connection (output = input + attention(input)) ensures
that gradients flow through unchanged: d_input = d_output. With frozen
weights, we don't compute attention weight gradients, making this a
literal no-op when the input and output buffers alias (as they do in
apply_iqn_trunk_gradient).

Phase B will add attention path gradients when weights are unfrozen.
2026-03-24 01:52:22 +01:00
..