Repository navigation
Conversation
ahuber21
requested review from
mihaic,
rfsaliev and
yuejiaointel
as code owners
December 1, 2026 08:26
ahuber21
changed the base branch from
dev/ahuber/pq-upstream
to
dev/ahuber/emeans
December 1, 2026 08:28
ahuber21
force-pushed
the
dev/ahuber/pq-emeans
branch
from
December 1, 2026 10:09
a8e9980 to
67affb9
Compare
ahuber21
force-pushed
the
dev/ahuber/pq-emeans
branch
from
December 2, 2026 10:25
67affb9 to
c88d341
Compare
Add PQTrainer { EMeans, Lloyd } and an EMeansParameters member to
PQTrainingParameters. E-means is the default; Lloyd stays selectable and
num_iterations/minibatch_size apply to it only. train_subspace now
dispatches to train_subspace_lloyd (unchanged algorithm) or
train_subspace_emeans, sharing slicing, init_centroids and the per-subspace
rng stream. No existing test asserted exact centroid values, so none changed.
New tests: default trainer, e-means vs Lloyd reconstruction error, explicit
Lloyd selection, per-seed determinism for both trainers.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ahuber21
force-pushed
the
dev/ahuber/pq-emeans
branch
from
December 2, 2026 10:26
c88d341 to
2482d0e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PQ codebooks are now trained per subspace with e-means instead of Lloyd. Lloyd stays selectable via
PQTrainer::Lloyd.Gotchas:
main.train_codebooksandPQDataset::compresscaller.Flat-scan recall@10 (f32 tables, 256 centroids, 112 threads, single run per cell, default seed):
DPR width 4 over three training seeds: mean recall@10 0.6607 (Lloyd) against 0.6611 (e-means). The -0.0032 above is seed noise.