ewfian / faiss-node

Node.js bindings for faiss
https://www.npmjs.com/package/faiss-node
MIT License
107 stars 10 forks source link

Labels are 64bit but JS bindings were limited to 32bit #43

Open asilvas opened 11 months ago

asilvas commented 11 months ago

An important change for large indexes, and precursor to supporting vector identifiers where index is insufficient. Faiss already natively uses 64bit labels, this PR just prevents the conversion loss.

asilvas commented 11 months ago

Let me know if you prefer these small PR's or one bigger one. Have quite a few improvements planned.

ewfian commented 11 months ago

Let me know if you prefer these small PR's or one bigger one. Have quite a few improvements planned.

Thank you very much for your series of improvements. Small PR's are preferred

ewfian commented 11 months ago

@asilvas Thank you for this pr, but considering the following points, I would like to put this pr aside. Maybe we can provide another API to deal with 64bit issues in the future.

  1. This modification will brings break changes and cause great trouble to downstream users.
  2. Number and BigInt are not interoperable. Generally, users are more familiar with number, and using number will have better compatibility with other libraries.
  3. Generally speaking, if a user uses javascript, I do not expect him to have sufficient requirements for performance and data volume.
asilvas commented 11 months ago

If you're not interested in serious improvements you can close my PR's and I'll move to fork.