diff options
| author | Void Agent <void@jayrup.hermes> | 2026-08-14 13:14:09 +0100 |
|---|---|---|
| committer | Void Agent <void@jayrup.hermes> | 2026-08-14 13:14:09 +0100 |
| commit | 9c50f31c66e788ff08eeac83f84e90e9bc1a921e (patch) | |
| tree | 6e960573f436ee65f35ce9b77ad9064977339a8c /tests/test_models.py | |
| parent | 898a0570dfe619ec2bcf330b07dce9b23cb63d54 (diff) | |
rnn: fully-tied cell (read-in+compute+decode), lambda ramp, ACT regression test; design: prior art + review
Diffstat (limited to 'tests/test_models.py')
| -rw-r--r-- | tests/test_models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_models.py b/tests/test_models.py index 7994e86..b6fec4d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -48,6 +48,15 @@ def test_transformer_integers_mode(): assert out["logits"].shape == (4, b["y"].shape[1], cfg.vocab) +def test_rnn_fully_tied_no_gru_decoder(): + """Regression: design review fix — everything recurrent must be the ONE tied cell.""" + import torch.nn as nn + cfg = Config(model="rnn") + m = build_model(cfg) + assert not any(isinstance(mod, nn.GRUCell) for mod in m.modules()) + assert not any(isinstance(mod, (nn.GRU, nn.LSTM, nn.RNN)) for mod in m.modules()) + + def test_param_counts_logged_not_gated(): r = build_model(Config(model="rnn")).param_count() t = build_model(Config(model="transformer")).param_count() |
