diff --git a/examples/faiss/1-flat.kg b/examples/faiss/1-flat.kg index d7a3b72..6ff9318 100644 --- a/examples/faiss/1-flat.kg +++ b/examples/faiss/1-flat.kg @@ -6,15 +6,15 @@ d::64 :" dimension " nb::100000 :" database size " nq::10000 :" nb of queries " -rns(1234) :" make reproducible " +rns(1234) :" make reproducible " xb::rna(nb,d) xq::rna(nq,d) index::IndexFlatL2(d);add::.pya(index;"add");search::.pya(index;"search") -.p(.pya(index,"is_trained")) +.p(.pya(index;"is_trained")) add(xb) -.pya(index;"ntotal") +.p(.pya(index;"ntotal")) k::4 DI::search(5#xb;k) diff --git a/examples/faiss/README.md b/examples/faiss/README.md new file mode 100644 index 0000000..d5a748f --- /dev/null +++ b/examples/faiss/README.md @@ -0,0 +1,13 @@ +Setup: + +CPU: + +``` +pip3 install faiss-cpu +``` + +GPU: + +``` +pip3 install faiss-cpu +```