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
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
Share
SQ8TrainingStatebetween RAM tiered HNSW and the optional trained disk implementation. It owns the capped training threshold, FP64 running sums, live-vector count and mean calculation. RAM keeps its existing scheduling and training behavior; disk supplies its own storage and jobs.Add
TieredHNSWDiskParams::QuantNormalizationSetSizefor downstream parameter forwarding. This PR does not change disk defaults: downstream disk HNSW keeps regular SQ8 unlessCOMPRESSION SQ8is explicitly requested.TRAINING_THRESHOLDretains RAM semantics, including zero to skip learning.Which issues this PR fixes
Prerequisite for MOD-17189. Merge order: VecSim → RediSearch integration → RSE disk integration. Downstream dependencies pin this published branch commit until it merges.
Validation
Code remains at
30983555573524436edc8c55960e18606965ad89: all sixSQ8TrainingStatecomponent tests and all 162HNSWTieredIndexTestSQ8*.*tests passed on dorer-intel. The optional disk behavior and its integration validation belong to the downstream PRs. This revision updates the description; it adds no library code.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.