NVIDIA / NVIDIA/cuvs

[QST] Is there a two_pass_precision mode for brute force knn?

Open
#333 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

My project uses RAFT brute force knn and I noticed a drop in precision when I upgraded to the latest RAFT. I moved to cuvs but still see cosine similarity that's off by more than 1e-04 when compared to the dot product cpu calculation. Is this a bad use case for cuvs?

I had this issue before when I was using cuML and two_pass_precission fixed it, unfortunately it also suffered from a different correctness bug https://github.com/rapidsai/cuml/issues/5569. Would appreciate any suggestions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the cuVS brute-force KNN cosine-similarity result and comparing it with the CPU dot-product calculation. Check whether cuVS provides an equivalent to cuML's two_pass_precision mode, and review the linked cuML issue 5569. Done means identifying the supported precision behavior or documenting the limitation and recommended approach.

Written by the indexing model from the issue text.

Assessment

Domain
machine-learning, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.