Skip to content

Commit 7829971

Browse files
committed
Added special tolerance handling for ABBA Conv layers.
1 parent 5eb5865 commit 7829971

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_custom_models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,10 @@ def test_disable_adapters_with_merging(self, test_name, model_id, config_cls, co
22582258
if config_kwargs.get("use_dora") and model_id == "EmbConv1D":
22592259
atol, rtol = 1e-4, 1e-4
22602260

2261+
# ABBA Conv layers have slightly more numerical instability during merge/unmerge
2262+
if config_kwargs.get("init_weights") == "abba" and model_id in ["Conv1d", "Conv1dBigger", "Conv2d", "Conv2d1x1"]:
2263+
atol, rtol = 1e-4, 1e-4
2264+
22612265
# check that there is a difference in results after training
22622266
assert not torch.allclose(outputs_before, outputs_after, atol=atol, rtol=rtol)
22632267

0 commit comments

Comments
 (0)