Skip to content

Test head-wise compression#103

Merged
alessiodevoto merged 9 commits intomainfrom
aledev/headcompr
Jul 25, 2025
Merged

Test head-wise compression#103
alessiodevoto merged 9 commits intomainfrom
aledev/headcompr

Conversation

@alessiodevoto
Copy link
Copy Markdown
Collaborator

PR description

Some presses perform head-wise compression. To achieve that, we use a patch on the attention function (see attention_patch.py). This PR adds a test that ensures that the cumulative compression ratio corresponds to the expected one.

Side note: I also excluded some files from the .flake8 tests

Checklist

  • Tests are working (make test)
  • Code is formatted correctly (make style, on errors try fix with make format)
  • Copyright header is included
  • All commits are signed-off using git commit -s
  • (new press) mypress_press.py is in the presses directory
  • (new press) MyPress is in __init__.py
  • (new press) README.md is updated with a 1 liner about the new press in the Available presses section
  • (new press) New press is in the default_presses list in tests/default_presses.py
  • (new press) A docstring is provided that follows the same structure as the existing ones

Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
@alessiodevoto alessiodevoto requested a review from maxjeblick July 24, 2025 13:40
Copy link
Copy Markdown
Collaborator

@maxjeblick maxjeblick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR; adding this test is really helpful!

I left some comments; IMO adding a new test(file) for head-wise presses improves readability.

Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
merge main into aledev/headcompr
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Signed-off-by: alessiodevoto <devoto.alessio@gmail.com>
Copy link
Copy Markdown
Collaborator

@maxjeblick maxjeblick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot LGTM!

@alessiodevoto alessiodevoto merged commit 98e1327 into main Jul 25, 2025
3 checks passed
@alessiodevoto alessiodevoto deleted the aledev/headcompr branch July 25, 2025 09:10
maxjeblick pushed a commit that referenced this pull request Aug 12, 2025
Signed-off-by: Max Jeblick <maximilianjeblick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants