mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
Add IVF index for vec0 virtual table
Add inverted file (IVF) index type: partitions vectors into clusters via k-means, quantizes to int8, and scans only the nearest nprobe partitions at query time. Includes shadow table management, insert/delete, KNN integration, compile flag (SQLITE_VEC_ENABLE_IVF), fuzz targets, and tests. Removes superseded ivf-benchmarks/ directory.
This commit is contained in:
parent
43982c144b
commit
3358e127f6
22 changed files with 5237 additions and 28 deletions
15
Makefile
15
Makefile
|
|
@ -206,6 +206,21 @@ test-loadable-watch:
|
|||
test-unit:
|
||||
$(CC) -DSQLITE_CORE -DSQLITE_VEC_TEST -DSQLITE_VEC_ENABLE_RESCORE tests/test-unit.c sqlite-vec.c vendor/sqlite3.c -I./ -Ivendor -o $(prefix)/test-unit && $(prefix)/test-unit
|
||||
|
||||
# Standalone sqlite3 CLI with vec0 compiled in. Useful for benchmarking,
|
||||
# profiling (has debug symbols), and scripting without .load_extension.
|
||||
# make cli
|
||||
# dist/sqlite3 :memory: "SELECT vec_version()"
|
||||
# dist/sqlite3 < script.sql
|
||||
cli: sqlite-vec.h $(prefix)
|
||||
$(CC) -O2 -g \
|
||||
-DSQLITE_CORE \
|
||||
-DSQLITE_EXTRA_INIT=core_init \
|
||||
-DSQLITE_THREADSAFE=0 \
|
||||
-Ivendor/ -I./ \
|
||||
$(CFLAGS) \
|
||||
vendor/sqlite3.c vendor/shell.c sqlite-vec.c examples/sqlite3-cli/core_init.c \
|
||||
-ldl -lm -o $(prefix)/sqlite3
|
||||
|
||||
fuzz-build:
|
||||
$(MAKE) -C tests/fuzz all
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue