-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
Description
Summary
I intended to train an "IVF65536,PQ64" index with 20 million 1024d vectors on a server with 400G RAM and 4 x V100 (16G) GPUs.
It ran out of memory. I know these vectors already take ~80G RAM even without doing anything.
My questions are
- How much RAM is needed to train such an index (i.e., "IVF65536,PQ64") with 20M 1024d vectors?
- Are there ways to optimize the RAM usage?
Thanks
Platform
OS: Ubuntu 18.04.6 LTS
Faiss version: 1.7.2
Installed from: pip install faiss-gpu
Faiss compilation options:
Running on:
- GPU
Interface:
- Python
Reproduction instructions
dim = 1024
index_type = "IVF65536,PQ64"
index = faiss.index_factory(dim, index_type)
# move to gpus
co = faiss.GpuMultipleClonerOptions()
co.useFloat16 = True
gpu_index = faiss.index_cpu_to_all_gpus(index, co)
# train
# x.shape = (20*1000*1000, 1024)
gpu_index.train(x)
# Error Message from OS: "Killed PID"
Reactions are currently unavailable