def METHOD_NAME(self):
    """
    Load dense embeddings and index with FAISS.
    """
    # create index
    index_dir = self.opt['embeddings_dir']
    embs_name = (
        f"{self.opt['embeddings_name']}_" if self.opt['embeddings_name'] else ''
    )
    num_parts = len(
        [
            f
            for f in os.listdir(index_dir)
            if f.endswith('.pt') and 'sample' not in f
        ]
    )
    input_files = [
        os.path.join(index_dir, f'{embs_name}{i}.pt') for i in range(num_parts)
    ]
    if self.opt['indexer_type'] == 'compressed':
        index_name = self.opt['compressed_indexer_factory'].replace(',', '__')
    elif self.opt['embeddings_name']:
        index_name = self.opt['embeddings_name']
    else:
        index_name = 'hnsw_flat'
    index_path = os.path.join(index_dir, index_name)
    if self.opt['save_index_dir']:
        index_path, index_name = os.path.split(index_path)
        index_path = os.path.join(self.opt['save_index_dir'], index_name)
        if not os.path.exists(self.opt['save_index_dir']):
            logging.info(f'Creating directory for file {index_path}')
            os.makedirs(self.opt['save_index_dir'])
    logging.info(f'index path: {index_path}')
    self.index_path = index_path
    self.index = indexer_factory(self.opt)
    if self.opt['indexer_type'] != 'exact':
        self.train_then_add(input_files)
    else:
        self.index_data(input_files)
    # save data
    self.index.serialize(index_path)