Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjeblick committed Dec 11, 2024
1 parent ef03b4a commit 1079a03
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/presses/test_presses.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
KnormPress,
ObservedAttentionPress,
RandomPress,
SnapKVPress,
SimLayerKVPress,
SnapKVPress,
StreamingLLMPress,
TOVAPress,
)
Expand All @@ -34,13 +34,25 @@ def test_composed_press(unit_test_model): # noqa: F811


@pytest.mark.parametrize(
"cls", [KnormPress, ExpectedAttentionPress, RandomPress, StreamingLLMPress, SnapKVPress, TOVAPress, ThinKPress]
"cls",
[
KnormPress,
ExpectedAttentionPress,
RandomPress,
StreamingLLMPress,
SnapKVPress,
TOVAPress,
ThinKPress,
SimLayerKVPress,
],
)
@pytest.mark.parametrize("compression_ratio", [0.2, 0.8])
@pytest.mark.parametrize("wrapper_press", [None, ComposedPress, KeyRerotationPress])
def test_presses_run(unit_test_model, cls, compression_ratio, wrapper_press): # noqa: F811
if cls == ThinKPress:
press = cls(key_channel_compression_ratio=compression_ratio, window_size=2)
elif cls == SimLayerKVPress:
press = cls(lazy_threshold=compression_ratio, n_initial=1, n_recent=1, n_last=1)
else:
press = cls(compression_ratio=compression_ratio)
if cls in [SnapKVPress]:
Expand Down

0 comments on commit 1079a03

Please sign in to comment.