Repository navigation
Conversation
dor-forer
marked this pull request as draft
October 18, 2026 10:45
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1078 +/- ##
==========================================
- Coverage 97.58% 97.57% -0.01%
==========================================
Files 142 143 +1
Lines 9444 9456 +12
==========================================
+ Hits 9216 9227 +11
- Misses 228 229 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dor-forer
force-pushed
the
mod-17189-sq8-accumulator
branch
from
October 18, 2026 12:33
a4438c1 to
3098355
Compare
2 of 4 tasks
dor-forer
marked this pull request as ready for review
October 18, 2026 12:38
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.
Describe the changes in the pull request
RAM and disk tiered indexes need the same SQ8 training rules. Share the capped training threshold, double-precision sums, live-vector count, and mean calculation in
SQ8TrainingState; RAM tiered HNSW uses this state while retaining its existing locks and jobs. Add the disk training-size parameter to the shared tiered configuration so the disk implementation can use the same state.Which issues this PR fixes
Prerequisite for MOD-17189. Review and merge order: VecSim → RediSearch dependency/integration → RSE disk implementation. Downstream PRs pin this branch commit until it merges.
Main objects this PR modified
SQ8TrainingState: owns add/subtract/count/threshold/mean invariants.TieredHNSWDiskParams: exposes the internal disk training-size setting; zero skips training.Validation
On dorer-intel, source commit
30983555573524436edc8c55960e18606965ad89passed all 6SQ8TrainingStatecomponent tests and all 162HNSWTieredIndexTestSQ8*.*tests. The integrated RSE build using this commit passed 483 disk-vector tests and real Flex restart/training checks. Disk performance acceptance is pending in the downstream integration.Mark if applicable
Note
Medium Risk
Changes SQ8 training bookkeeping and finalize preconditions for tiered HNSW; behavior is intended to be equivalent but mistakes would affect quantization mean and backend initialization.
Overview
Introduces shared
SQ8TrainingStatefor SQ8 training while vectors accumulate in the flat buffer: capped normalization threshold, FP64 running sums, live vector count, add/subtract, finalize check, and mean calculation.Tiered RAM HNSW drops its nested
SQAccumulationStateandcalculateQuantizationMean; it delegates toSQ8TrainingStateand adds asserts that training count matches flat index size. Finalization now usesshouldFinalize()andcalculateMean().TieredHNSWDiskParamsreplaces the placeholder withQuantNormalizationSetSize(same semantics as tiered RAM HNSW) so disk tiered indexes can share the same training rules in follow-up work.Adds component tests for
SQ8TrainingState(float/float16, threshold cap, FP64 accumulation) and updates tiered SQ8 test accessors to use the new getters.Reviewed by Cursor Bugbot for commit 3098355. Bugbot is set up for automated code reviews on this repo. Configure here.