Skip to content

Instantly share code, notes, and snippets.

@mdouze
Last active November 11, 2024 06:53
Show Gist options
  • Save mdouze/46d6bbbaabca0b9778fca37ed2bcccf6 to your computer and use it in GitHub Desktop.
Save mdouze/46d6bbbaabca0b9778fca37ed2bcccf6 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@QwertyJack
Copy link

Your dataset requires 1 TiB ram! Try to reduce the dimension as well as the nlist, or you will never get this index trained.

@vigneshmj1997
Copy link

My dataset isnt getting trained on cpu rather that gpu inspite of using
index_ivf = faiss.extract_index_ivf(index2) clustering_index = faiss.index_cpu_to_all_gpus(faiss.IndexFlatL2(64)) index_ivf.clustering_index = clustering_index
Can any one help me

@anoubhav
Copy link

anoubhav commented Jan 18, 2022

Can we use the GPU version of the Binary Flat index as the clustering index for the binary indexes? Like below:
faiss.index_cpu_to_all_gpus(faiss.IndexBinaryFlat(d))

@rajharshiitb
Copy link

My dataset isnt getting trained on cpu rather that gpu inspite of using index_ivf = faiss.extract_index_ivf(index2) clustering_index = faiss.index_cpu_to_all_gpus(faiss.IndexFlatL2(64)) index_ivf.clustering_index = clustering_index Can any one help me

Do you have faiss-gpu installed? What do you get for faiss.get_num_gpu()?

@fferroni
Copy link

fferroni commented Apr 13, 2023

Hi @mdouze , is it correct that something like:
"PCAR1024,IVF262144_HNSW32,PQ512x8" (with inner product)
cannot be trained on the GPU?
https://gist.github.com/mdouze/46d6bbbaabca0b9778fca37ed2bcccf6?permalink_comment_id=3111847#gistcomment-3111847
You mention that PQ quantisation is not implemented?

@ucas010
Copy link

ucas010 commented Nov 11, 2024

hi,dear
my dataset dim=768 and num=1billion
and what type of ivf PQ is good for the index in CPU ?
thx
@mdouze

@ucas010
Copy link

ucas010 commented Nov 11, 2024

the up code
index2 could be write directly ?
such as faiss.write_index(index2,"index2.idx") ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment