Add the missing b_hn bias to nnx.GRUCell #5645
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.31) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 108 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.281
Real PR Conversation Timeline
1 comments
"Review active on #5645"
general
weight: 0.35
samanklesaria
Closes #5594. Replaces #5595, which was closed when main was force-pushed to its branch.
nnx.GRUCelldocumentsn = tanh(W_in x + b_in + r * (W_hn h + b_hn)), andlinen.GRUCellbuildsb_hnas the bias of itshnlayer. nnx fuses r, z and n into one bias-freedense_h, sob_hnwas missing.Fix: add it as its own
hn_biasparameter (a bias on the fuseddense_hwould also reach r and z), promoted and broadcast likeLinear's bias.Test: no new tests, per review. With weights copied from
linen.GRUCelland a non-zerobias_init, the outputs match; on main they do not.tests/nnx/nn/recurrent_test.pypasses on CPU (20 tests).Compatibility: one extra array in the parameter tree, so a checkpoint saved from the old
nnx.GRUCellneeds a fallback to restore.bias_initdefaults to zeros, so a fresh cell is numerically unchanged.