/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
syntax = "proto2";
package tflite.scann_ondevice;
import "tensorflow_lite_support/scann_ondevice/cc/core/serialized_searcher.proto";
// Configuration for the ScaNN on-device index file.
// Next Id: 5.
message IndexConfig {
// The ScaNN on-device config used to configure the ScaNN searcher for this
// index file.
optional tflite.scann_ondevice.core.ScannOnDeviceConfig scann_config = 1;
// The type of the embeddings stored in this index.
enum Type {
UNSPECIFIED = 0;
// Floating-point embeddings.
FLOAT = 1;
// Product-quantized embeddings.
UINT8 = 2;
}
optional Type embedding_type = 2;
// The embeddings dimensionality.
optional uint32 embedding_dim = 3;
// The global offset of each partition stored in the index.
repeated uint32 global_partition_offsets = 4 [packed = true];
}