Repository navigation
Experiment/spacing rescoring adaptive - #1
Merged
Merged
Conversation
Codec gains prepare_query and score_prepared, so a codec that works in a transformed space rotates the query once per search instead of once per stored vector. Defaults are the identity and score(); TruncateCodec forwards to its inner codec; the store's search uses the prepared path. mixed<B>[-pca][-w] spends a fixed B-byte budget per vector with bits allocated per dimension by greedy reverse water-filling, each dimension quantized with Max's Gaussian-optimal uniform step. -pca rotates into the corpus's principal components first (Jacobi eigensolver, fitted on up to 20k vectors); -w allocates by variance times query energy, which targets score error rather than reconstruction error.
bench recall reports three new numbers: boundary_gap (exact score gap between rank k and k+1), neighbour_band (rank k to 2k) and rank_noise (the codec's score-error spread over the exact top 2k, per-query bias removed). bench rescore scans with one codec and re-scores candidates with another (int8 or f32) under three policies: none, a fixed depth, or an adaptive margin that re-scores every candidate within N calibrated noise units of the k-th first-stage score. Noise is calibrated on self-queries only. Reports recall, worst-decile recall, nDCG, mean and p90 depth, bytes read per query, and the exact depth an f32 re-score needs for 90/95/99/100% recall. Query loading is shared with bench recall.
…oring Neighbour spacing: SciFact, NFCorpus, ArguAna, FiQA and CoSQA (code, via CoIR) on bge-small and MiniLM, nine codecs. Codec noise over the corpus's neighbour band ranks recall@10 loss with Spearman 0.98 over 90 points, against 0.64 for noise alone, and predicts a held-out corpus within 0.024. Content type matters only through spacing; the embedding model moves it as much as the corpus does. Write-up, site page and blog post. Two-stage rescoring: the same collections, five first stages, int8 and f32 second stages. The ratio predicts the depth needed (rho about 0.93; depth/k = 4.8 r^1.29 for 95% recall). At 48 bytes, 50 f32 candidates recover 0.95 (binary) to 0.99 (pq48) of the top 10 for 3-4% of an f32 scan's bytes. Roadmap: results and follow-ups, and a section on MoE compression work (QuantMoE-Bench, MoE-SVD, Sub-MoE) mapped onto hvec codecs. References: the five datasets, QuantMoE-Bench, Sub-MoE, Max 1960, Huang-Schultheiss.
Scan codecs (uniform binary/pq against adaptive mixed<B> bit allocation at 24, 48 and 96 bytes) crossed with re-score policies (none, fixed depth, adaptive margin) and int8/f32 second stages. Results and write-up follow when the run completes.
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.
No description provided.