Questions tagged [faiss]

77 questions
2
votes
2 answers

How to find the actual sentence from sentence transformer?

I am trying to do semantic search with sentence transformer and faiss. I am able to generate emebdding from corpus and perform query with the query xq. But what are t from sentence_transformers import SentenceTransformer, util model =…
2
votes
2 answers

How to perform operations on very big torch tensors without splitting them

My Task: I'm trying to calculate the pair-wise distance between every two samples in two big tensors (for k-Nearest-Neighbours), That is - given tensor test with shape (b1,c,h,w) and tensor train with shape (b2,c,h,w), I need || test[i]-train[j] ||…
Hadar
  • 658
  • 4
  • 17
2
votes
1 answer

Segmentation fault while using FAISS `index.search()` in FastAPI

I am trying to do an index search given a vector within a FAISS index that is saved on disk and is read into memory. This happens within a function that is called within an endpoint using FastAPI. The endpoint and the function it is calling are the…
mabergerx
  • 1,216
  • 7
  • 19
2
votes
1 answer

Milvus has very slow indexing speed on CPU at 150K records

we are using milvus with the default configurations for CPU deployment, wit every new record ingested into milvus we were rebuilding the index inside milvus for this collection however we have seen an increase in time needed to build the index (…
2
votes
1 answer

Faiss : How to create an Index of 10M vectors of size 1024

I want to create an index of nearly 10M vectors of size 1024. Here is the code that I used. import numpy as np import faiss import random f = 1024 vectors = [] no_of_vectors=10000000 for k in range(no_of_vectors): v =…
Janaka
  • 481
  • 4
  • 14
1
vote
0 answers

Installing node-faiss & libomp when deploying

I'm building AI website with Chagpt API & langchain. all using node.js, express now when I want to deploy the project on any platform, like vercel or renderjs I get this error telling me that faiss-node library is not installed and I need to…
HamzaElkotb
  • 138
  • 1
  • 7
1
vote
0 answers

HuggingFace Space with Langchain and Gradio SDK: Why am I getting a FAISS-related error when I'm using Chroma, not FAISS?

I am building a HuggingFace Space with Langchain (Gradio SDK) to chat my data, cloning from Harrison Chase's Chat Your Data space and going from there. Fixed a deprecation issue (see Discussion), switched to a DirectoryLoader so I can ingest…
Leanna
  • 107
  • 9
1
vote
0 answers

"faiss" module doesnt initiate in python (anaconda)

I've been working on something which uses an obscure module called "faiss", I'm running under anaconda with all necessary modules, but I've been having problem with this one. during setup, it gives me this error: "Traceback (most recent call last): …
romrom83
  • 11
  • 4
1
vote
0 answers

How to create a vector database of huge set of enterprise documents?

This is a sort of a design question. I am VectorDB newbie. I am working on creating a LLM enable summarisation system for a huge set of documents. These documents will have a certain date in them. Users can be searching them on these dates. When the…
Tanmoy
  • 11
  • 2
1
vote
0 answers

Dynamic Filtering of Vectors by Community ID in Faiss for Improved Similarity Search

I have a use case where I need to dynamically exclude certain vectors based on specific criteria before performing a similarity search using Faiss. I have explored the Faiss GitHub repository and came across an issue that is closely related to my…
James K J
  • 31
  • 2
1
vote
1 answer

How ot write a Faiss index to memory?

I want to write a faiss index to back it up on the cloud. I can write it to a local file by using faiss.write_index(filename, f). However, I would rather dump it to memory to avoid unnecessary disk IO. I tried passing in a StringIO or ByteIO stream,…
Lizozom
  • 2,161
  • 2
  • 21
  • 38
1
vote
0 answers

Installing Faiss in a Docker container

I'm trying to integrate the Faiss library into a Rasa actions server. The suggested installation method for the faiss-cpu package is via conda. I've naively assembled the following Dockerfile to build a custom image which contains both Rasa SDK and…
vonbecker
  • 55
  • 1
  • 4
1
vote
2 answers

Vector similarity search in iOS

Is there an implementation of vector similarity search that works in iOS? I have a set of ~10K+ vectors. When I get a new vector, I'd like to find the top K vectors from the set that are most similar to the new vector. This can be done either in a…
Alcibiades
  • 335
  • 5
  • 16
1
vote
0 answers

Handling faiss-cpu vs. faiss-gpu in python setup script

I am trying write the setup script for my Python package which uses faiss such that an end user can install the CPU version of my package by default or specify a GPU-enabled version using extras_require. The problem is that faiss breaks if both…
void_panda
  • 53
  • 5
1
vote
0 answers

FAISS: adding vectors to index by parts

im new to Faiss! My task is to find similar vectors with inner product. Cause of limited ram on my laptop, im currently trying to add some new vectors to trained index I've created before. Situation: im already have trained and tuned index, I want…
Fedor
  • 19
  • 4