-
Notifications
You must be signed in to change notification settings - Fork 83
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] sparse: use staged cursor and upper_bound for WAND #970
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sparknack The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @sparknack! It looks like this is your first PR to zilliztech/knowhere 🎉 |
@sparknack 🔍 Important: PR Classification Needed! For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:
For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”. Thanks for your efforts and contribution to the community!. |
/kind improvement |
issue: #967 |
Signed-off-by: Shawn Wang <[email protected]>
9ddd7a7
to
f0d8927
Compare
/hold |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #970 +/- ##
=========================================
+ Coverage 0 74.39% +74.39%
=========================================
Files 0 82 +82
Lines 0 6690 +6690
=========================================
+ Hits 0 4977 +4977
- Misses 0 1713 +1713 |
Use staged cursor and upper_bound to avoid recalculating the score from cursor 0 every time in the loop. And modify some variable names to be more readable.
Simple benchmark result(time used to search all queries once on the full dataset) with drop ratio build 0.32 and drop ratio search 0.6:
This optimization seems to have an improvement on learned sparse embedding like SPLADE, which is denser, but leads to a little bit of performance degration on more sparse embeddings.
Hold the review of this PR for now until more investigation.