Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add mean and median threshold modes to binary quantization #716

Open
wants to merge 20 commits into
base: branch-25.04
Choose a base branch
from

Conversation

enp1s0
Copy link
Member

@enp1s0 enp1s0 commented Feb 24, 2025

The current binary quantization function sets a bit when the corresponding input dataset element is positive. This method (zero threshold mode) does not work well for, for example, a dataset where all elements are positive. This PR adds mean and median modes that set bits when the corresponding elements are larger than the dim-wise mean and median, respectively.

The new transform function requires rapidsai/raft#2592 to be merged to support large datasets.

TODO:

  • c++
  • c
  • test
  • python

@enp1s0 enp1s0 requested a review from a team as a code owner February 24, 2025 11:57
@github-actions github-actions bot added the cpp label Feb 24, 2025
@enp1s0 enp1s0 changed the title Add mean and median threshold mode to binary quantization Add mean and median threshold modes to binary quantization Feb 24, 2025
@enp1s0 enp1s0 self-assigned this Feb 24, 2025
@enp1s0 enp1s0 added breaking Introduces a breaking change improvement Improves an existing functionality labels Feb 24, 2025
@enp1s0 enp1s0 changed the title Add mean and median threshold modes to binary quantization [WIP] Add mean and median threshold modes to binary quantization Feb 24, 2025
@cjnolet
Copy link
Member

cjnolet commented Feb 24, 2025

@enp1s0 this sounds super useful! Thanks for opening the PR. Do you have a sense for how much this improves recall?

@enp1s0 enp1s0 requested a review from a team as a code owner February 26, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Introduces a breaking change cpp improvement Improves an existing functionality Python
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants