forked from opensearch-project/k-NN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration of Quantization Framework for Binary Quantization with In…
…dexing Flow (opensearch-project#1996) * Integration of Quantization Framework for Binary Quantization with Indexing Flow Signed-off-by: VIKASH TIWARI <[email protected]> * Integration With Qunatization Config Signed-off-by: VIKASH TIWARI <[email protected]> --------- Signed-off-by: VIKASH TIWARI <[email protected]>
- Loading branch information
Showing
31 changed files
with
1,414 additions
and
173 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
src/main/java/org/opensearch/knn/index/codec/nativeindex/IndexBuildSetup.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.knn.index.codec.nativeindex; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import org.opensearch.knn.quantization.models.quantizationOutput.QuantizationOutput; | ||
import org.opensearch.knn.quantization.models.quantizationState.QuantizationState; | ||
|
||
/** | ||
* IndexBuildSetup encapsulates the configuration and parameters required for building an index. | ||
* This includes the size of each vector, the dimensions of the vectors, and any quantization-related | ||
* settings such as the output and state of quantization. | ||
*/ | ||
@Getter | ||
@AllArgsConstructor | ||
final class IndexBuildSetup { | ||
/** | ||
* The number of bytes per vector. | ||
*/ | ||
private final int bytesPerVector; | ||
|
||
/** | ||
* Dimension of Vector for Indexing | ||
*/ | ||
private final int dimensions; | ||
|
||
/** | ||
* The quantization output that will hold the quantized vector. | ||
*/ | ||
private final QuantizationOutput quantizationOutput; | ||
|
||
/** | ||
* The state of quantization, which may include parameters and trained models. | ||
*/ | ||
private final QuantizationState quantizationState; | ||
} |
Oops, something went wrong.