FaissIVFIndexConfig

class lightning_ir.retrieve.faiss.faiss_indexer.FaissIVFIndexConfig(num_train_embeddings: int | None = None, num_centroids: int = 262144, ef_construction: int = 40)[source]

Bases: _FaissTrainIndexConfig

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

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

Initialize the FaissIVFIndexConfig.

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.

Methods

__init__([num_train_embeddings, ...])

Initialize the FaissIVFIndexConfig.

Attributes

indexer_class

alias of FaissIVFIndexer