Skip to content

TurboQuant: better centroid initialization #8116

Open
connortsui20 wants to merge 2 commits into
developfrom
ct/tq-init
Open

TurboQuant: better centroid initialization #8116
connortsui20 wants to merge 2 commits into
developfrom
ct/tq-init

Conversation

@connortsui20
Copy link
Copy Markdown
Contributor

@connortsui20 connortsui20 commented May 27, 2026

Summary

Tracking issue: #7830

Followup of #8076

Changes the centroid initialization for vortex-turboquant to use +- sqrt(bit_width) * sigma instead of just [-1, 1]

Testing

uv run benchmarks/vector-search-bench/scripts/plot-turboquant-distortion.py \
            --dataset cohere-small-100k:single \
            --dataset openai-medium-500k:single \
            --dataset bioasq-medium-1m \
            --dataset glove-small-100k \
            --dataset gist-small-100k \
            --dataset sift-small-500k \
            --output ~/Downloads/distortion-sqrt-sigma.png
distortion-3-sigma

@connortsui20 connortsui20 changed the base branch from develop to ct/tq-error May 27, 2026 08:56
@connortsui20 connortsui20 added the changelog/performance A performance improvement label May 27, 2026
@connortsui20 connortsui20 force-pushed the ct/tq-init branch 2 times, most recently from a6883d3 to ee63df1 Compare May 27, 2026 09:01
@connortsui20 connortsui20 marked this pull request as ready for review May 27, 2026 09:27
@connortsui20 connortsui20 mentioned this pull request May 27, 2026
8 tasks
@danking
Copy link
Copy Markdown
Contributor

danking commented May 27, 2026

@claude review with careful attention paid to the validity of the statistical arguments.

@github-actions

This comment was marked as resolved.

@connortsui20 connortsui20 force-pushed the ct/tq-init branch 2 times, most recently from 632606a to 04cb9ab Compare May 27, 2026 14:53
@connortsui20 connortsui20 requested a review from danking May 27, 2026 14:55
@codspeed-hq

This comment was marked as off-topic.

danking
danking previously approved these changes May 27, 2026
Copy link
Copy Markdown
Contributor

@danking danking left a comment

Choose a reason for hiding this comment

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

Two nits that can be addressed separately. Let's get this merged and shipped into Spiral.

Comment thread vortex-tensor/src/encodings/turboquant/centroids.rs Outdated
Comment thread vortex-tensor/src/encodings/turboquant/centroids.rs Outdated
@connortsui20
Copy link
Copy Markdown
Contributor Author

let me fix the nits and rebase on develop

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Copy link
Copy Markdown
Contributor

@danking danking left a comment

Choose a reason for hiding this comment

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

LGTM

@connortsui20 connortsui20 disabled auto-merge May 27, 2026 15:39
@connortsui20 connortsui20 enabled auto-merge (squash) May 27, 2026 15:39
@connortsui20 connortsui20 requested a review from danking May 27, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants