Skip to content

Add NVQ example#663

Open
ashkrisk wants to merge 2 commits into
mainfrom
nvq-tut
Open

Add NVQ example#663
ashkrisk wants to merge 2 commits into
mainfrom
nvq-tut

Conversation

@ashkrisk
Copy link
Copy Markdown
Contributor

@ashkrisk ashkrisk commented May 6, 2026

Adds an example showing re-ranking using NVQ.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Before you submit for review:

  • Does your PR follow guidelines from CONTRIBUTIONS.md?
  • Did you summarize what this PR does clearly and concisely?
  • Did you include performance data for changes which may be performance impacting?
  • Did you include useful docs for any user-facing changes or features?
  • Did you include useful javadocs for developer oriented changes, explaining new concepts or key changes?
  • Did you trigger and review regression testing results against the base branch via Run Bench Main?
  • Did you adhere to the code formatting guidelines (TBD)
  • Did you group your changes for easy review, providing meaningful descriptions for each commit?
  • Did you ensure that all files contain the correct copyright header?

If you did not complete any of these, then please explain below.

Copy link
Copy Markdown
Contributor

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

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

Nice tutorial! It currently crashes and needs a small fix to create the directory ./local directory.

@ashkrisk ashkrisk requested a review from r-devulap May 7, 2026 11:39
Copy link
Copy Markdown
Contributor

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

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

LGTM.

@akash-shankaran
Copy link
Copy Markdown

@ashkrisk @r-devulap one suggestion here, and feel free to tackle it separately off this PR. I wanted to run this, and compare the benefits of NVQ vs disk on the default dataset (ada-100k). A few things I felt could be added to the tutorial to make it more useful:

  1. Add storage size metrics along with recall, as NVQ is primarily about storage savings.
  2. A second parameter to pass in custom path, so someone can look at index files from various tutorials. The default can remain what is there today (which is a temp file path)
  3. Lastly, ability to run multiple tutorials together. Maybe this is already there?

I made some of these changes, and could see the benefit of NVQ based compression vs the disk one (which doesn't use NVQ) from a storage size perspective.

Screenshot 2026-05-11 at 11 16 50 AM

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.

3 participants