Skip to content

Quantization Config support#126

Merged
steleal merged 5 commits into
masterfrom
feature/quantization-config
Jul 24, 2026
Merged

Quantization Config support#126
steleal merged 5 commits into
masterfrom
feature/quantization-config

Conversation

@maximbogatyrev

Copy link
Copy Markdown

Добавлена поддержка quantization_config для HNSW-индексов и покрытие нового поведения тестами:

  • quantization-конфиг можно обновить через стандартное api добавления/обновления индексов (удалена аннотация Deprecated из соответствующих методов).
  • в аннотацию Hnsw добавлен блок QuantizationConfig
  • в HnswConfig добавлена вложенная модель QuantizationConfig
  • в HnswConfigs добавлено построение и валидация quantization-конфига из аннотаций
  • расширены unit-тесты для сканера аннотаций в ReindexAnnotationScannerHnswIndexTest
  • добавлены интеграционные тесты обновления quantization-конфига для builtin и cproto в HnswQuantizationConfigUpdateTest

По умолчанию quantization_config для HNSW не заполняется

@maximbogatyrev
maximbogatyrev requested a review from steleal March 26, 2026 12:30
@MadSchemas
MadSchemas self-requested a review March 26, 2026 13:37
Comment thread src/main/java/ru/rt/restream/reindexer/annotations/Hnsw.java
Comment thread src/main/java/ru/rt/restream/reindexer/annotations/Hnsw.java
/**
* Sample size for estimating quantile(s).
*/
int sampleSize() default 20_000;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Допустимые значения? Отрицательное можно?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

целые знаковые, от 1 до UINT64_MAX

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Добавил

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

В Java нет беззнаковых, максимальное значение int (Integer.MAX_VALUE) = 2^31 - 1 = 2 147 483 647.

Comment thread src/main/java/ru/rt/restream/reindexer/Reindexer.java
Comment thread src/main/java/ru/rt/restream/reindexer/vector/HnswConfigs.java
Comment thread src/main/java/ru/rt/restream/reindexer/annotations/Hnsw.java
@steleal
steleal merged commit a17df82 into master Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants