Comments (2)
Hey @ArthurMelin, thanks for the great reporting and debugging! Just pushed a fix.
A few notes to self:
lowerBound
indexing overflows at ~6500 lists since6500 * (6500 * 50)
is around 2^31 (centers * (centers * samples per center)
)halfcdist
indexing does not overflow since32768 * 32768
is less than 2^31 (IVFFLAT_MAX_LISTS * IVFFLAT_MAX_LISTS
), but could ifIVFFLAT_MAX_LISTS
is increased
from pgvector.
Found the issue, it's integer overflows in ivfkmeans.c for array accesses:
https://github.com/pgvector/pgvector/blob/master/src/ivfkmeans.c#L63
and similar others in ElkanKmeans().
I fixed it by changing the type of j
and k
to int64
. @ankane do you want me to make a PR?
from pgvector.
Related Issues (20)
- Support For Hamming Distance HOT 8
- HNSW Indexing Times Issue HOT 1
- Error creating index on materialized view HOT 2
- Follow up #425 - pgvector issues with postgresql 16.1 on macOS Sonoma HOT 1
- Limit HNSW build's shared memory size for small tables HOT 7
- crtdefs.h not found issue while running command nmake /F Makefile.win HOT 1
- text-embedding-3-small not working HOT 2
- Uninitialized entryPoint->level HOT 2
- Valgrind complains about uninitialized HnswCandidate.closer HOT 5
- OpenAI's text-embedding-3-large model not compatible with pgvector 5.1 HOT 8
- How can Use Max vCPUs at HNSW? HOT 1
- pgvector doesn't get installed if the required LIBS are not in same directory as in PGROOT argument HOT 1
- Clarify build instructions for Windows (the missing postgres.h header) HOT 2
- Publish v0.6.0 to Postgres apt repo HOT 3
- Vacuums extremely slow for HNSW indices? HOT 13
- vector_eq raises ERROR instead of returning FALSE. Is that intended behavior? HOT 7
- Install in windows not found vcvars64.bat HOT 2
- Problem creating HNSW index after upgrading to 0.6.0 HOT 2
- Does the vector query with distance return result in sorted order? HOT 2
- Performance Issue with Large Tables and HNSW Indexes HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgvector.