FaissIVFPQIndexer
- class lightning_ir.retrieve.faiss.faiss_indexer.FaissIVFPQIndexer(index_dir: Path, index_config: FaissIVFPQIndexConfig, module: BiEncoderModule, verbose: bool = False)[source]
Bases:
FaissIVFIndexerFAISS IVFPQ Indexer for approximate nearest neighbor search using Inverted File System (IVF) with Product Quantization (PQ).
- __init__(index_dir: Path, index_config: FaissIVFPQIndexConfig, module: BiEncoderModule, verbose: bool = False) None[source]
Initialize the FaissIVFPQIndexer.
- Parameters:
index_dir (Path) – Directory where the index will be stored.
index_config (FaissIVFPQIndexConfig) – Configuration for the FAISS IVFPQ index.
module (BiEncoderModule) – The BiEncoderModule to use for indexing.
verbose (bool) – Whether to enable verbose output. Defaults to False.
Methods
__init__(index_dir, index_config, module[, ...])Initialize the FaissIVFPQIndexer.
set_verbosity([verbose])Set the verbosity of the FAISS IVFPQ index.
Attributes
INDEX_FACTORY- set_verbosity(verbose: bool | None = None) None[source]
Set the verbosity of the FAISS IVFPQ index.
- Parameters:
verbose (bool | None) – Whether to enable verbose output. Defaults to None.