-
Notifications
You must be signed in to change notification settings - Fork 7
Quantization Config support #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ff88cb2
9b405a2
bfb9ded
30177a4
d0efe53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
| * Copyright 2020 Restream | ||
| * Copyright 2020-present Restream | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
|
|
@@ -79,4 +79,40 @@ | |
| */ | ||
| boolean multithreading() default false; | ||
|
|
||
| /** | ||
| * Optional quantization configuration for HNSW index. | ||
| * | ||
| * <p>When {@code quantizationConfig.quantizationType} is empty, the whole block is ignored. | ||
| * | ||
| * <p>Currently supported type: {@code scalar_quantization_8_bit}. | ||
| */ | ||
| QuantizationConfig quantizationConfig() default @QuantizationConfig; | ||
|
|
||
| /** | ||
| * Nested annotation representing {@code quantization_config} block. | ||
| */ | ||
| @interface QuantizationConfig { | ||
|
steleal marked this conversation as resolved.
|
||
| /** | ||
| * Quantization type. | ||
| * | ||
| * <p>Currently supported: {@code scalar_quantization_8_bit}. | ||
| */ | ||
| String quantizationType() default ""; | ||
|
steleal marked this conversation as resolved.
|
||
|
|
||
| /** | ||
| * Quantile for scalar quantization. Must be in range [0.95, 1.0] | ||
| */ | ||
|
steleal marked this conversation as resolved.
|
||
| float quantile() default -1.0f; | ||
|
|
||
| /** | ||
| * Sample size for estimating quantile(s). Must be in range [1, UINT64_MAX] | ||
| */ | ||
| int sampleSize() default 20_000; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Допустимые значения? Отрицательное можно?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. целые знаковые, от 1 до UINT64_MAX
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Добавил
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. В Java нет беззнаковых, максимальное значение int (Integer.MAX_VALUE) = 2^31 - 1 = 2 147 483 647. |
||
|
|
||
| /** | ||
| * Minimal number of points in the index required to enable quantization. Must be in range [1, UINT64_MAX] | ||
| */ | ||
| int quantizationThreshold() default 100_000; | ||
| } | ||
|
|
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.