FaissIVFPQIndexConfig

class lightning_ir.retrieve.faiss.faiss_indexer.FaissIVFPQIndexConfig(num_train_embeddings: int | None = None, num_centroids: int = 262144, ef_construction: int = 40, num_subquantizers: int = 16, n_bits: int = 8)[source]

Bases: FaissIVFIndexConfig

Configuration class for FAISS IVFPQ indexers in the Lightning IR framework.

__init__(num_train_embeddings: int | None = None, num_centroids: int = 262144, ef_construction: int = 40, num_subquantizers: int = 16, n_bits: int = 8) None[source]

Initialize the FaissIVFPQIndexConfig.

Parameters:
  • num_train_embeddings (int | None) – Number of embeddings to use for training the index. If None, it will be set later. Defaults to None.

  • num_centroids (int) – Number of centroids for the IVF index. Defaults to 262144.

  • ef_construction (int) – The size of the dynamic list used during construction. Defaults to 40.

  • num_subquantizers (int) – Number of subquantizers for the PQ index. Defaults to 16.

  • n_bits (int) – Number of bits for the PQ index. Defaults to 8.

Methods

__init__([num_train_embeddings, ...])

Initialize the FaissIVFPQIndexConfig.

Attributes

indexer_class

alias of FaissIVFPQIndexer