Skip to content

Commit 5171e23

Browse files
committed
Change test to assert 4D hook shape for attention pattern
1 parent 662c4c9 commit 5171e23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/model_bridge/test_bridge_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ def capture_pattern_hook(tensor, hook):
315315

316316
# Verify the shape is (n_heads, pos, pos) - attention patterns should not have batch dimension
317317
assert (
318-
len(pattern_tensor.shape) == 3
319-
), f"Pattern tensor should be 3D, got {len(pattern_tensor.shape)}D"
318+
len(pattern_tensor.shape) == 4
319+
), f"Pattern tensor should be 4D, got {len(pattern_tensor.shape)}D"
320320

321321
n_heads_dim, pos_q_dim, pos_k_dim = pattern_tensor.shape
322322

0 commit comments

Comments
 (0)