Git Product home page Git Product logo

Comments (4)

rom1504 avatar rom1504 commented on August 20, 2024

Autofaiss is an alternative implementation of faiss AutoTune that works based on the contraints listed in the readme.
Do you have any specific suggestions?

from autofaiss.

xiongqiangcs avatar xiongqiangcs commented on August 20, 2024

I think the faiss readme is a recommendation rather than a standard, it's a tradeoff between performance and recall.
Examples:
http://ann-benchmarks.com/sift-128-euclidean_10_euclidean.html

image

but autofaiss

if not should_be_memory_mappable:
# If we can build an HNSW with the given memory constraints, it's the best
m_hnsw = int(floor((max_size_in_bytes / (4 * nb_vectors) - dim_vector) / 2))
if m_hnsw >= 8:
return [f"HNSW{min(m_hnsw, 32)}"]

I recommend randomly sampling the embeddings and evaluate recall/perf by various index key parameters to get optimal index key,such as https://github.com/erikbern/ann-benchmarks/blob/8807d6ead4cf14318ac43166cdabf02b491f620e/algos.yaml#L146-L187

from autofaiss.

rom1504 avatar rom1504 commented on August 20, 2024

from autofaiss.

victor-paltz avatar victor-paltz commented on August 20, 2024

Hello @xiongqiangcs !

We chose to use a heuristic rather than benchmarking n different indices because it is n times faster and that the heuristic is not too far from finding the best index.
Also, the fine-tuning step makes it possible to improve the final index performance, so we close the gap with an eventually better index key to use.

But indeed, benchmarking n index keys could give better results. There might be good ideas to use to make it possible to benchmark quickly several indices while not taking too much time! We are open to any suggestions if you want to try it out 😁

from autofaiss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.