BART-ender commited on
Commit
e518f94
·
verified ·
1 Parent(s): 38e1c1e

test(core): add HRM-style architecture test case

Browse files
Files changed (1) hide show
  1. tests/test_model_support.py +14 -0
tests/test_model_support.py CHANGED
@@ -34,3 +34,17 @@ def test_model_support_rejects_non_eager_attention() -> None:
34
 
35
  assert support.supports_attribution is False
36
  assert "eager" in (support.reason or "")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  assert support.supports_attribution is False
36
  assert "eager" in (support.reason or "")
37
+
38
+
39
+ def test_model_support_accepts_hrm_layout() -> None:
40
+ layer = SimpleNamespace(attention=object())
41
+ model = SimpleNamespace(
42
+ model=SimpleNamespace(h_stack=SimpleNamespace(layers=[layer, layer])),
43
+ config=SimpleNamespace(_attn_implementation="eager"),
44
+ )
45
+
46
+ support = describe_model_support(model)
47
+
48
+ assert support.supports_attribution is True
49
+ assert support.layer_path == "model.h_stack.layers"
50
+ assert support.attention_attr == "attention"