Skip to content

QVAC-20631 feat: add TurboVec CPU vector index support#3292

Draft
dev-nid wants to merge 4 commits into
tetherto:mainfrom
dev-nid:turbovec-cpu
Draft

QVAC-20631 feat: add TurboVec CPU vector index support#3292
dev-nid wants to merge 4 commits into
tetherto:mainfrom
dev-nid:turbovec-cpu

Conversation

@dev-nid

@dev-nid dev-nid commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

embed-llamacpp did not have TurboVec CPU support for embedding vector search. Consumers could generate embeddings, but there was no in-package API for indexing vectors, searching by stable external IDs, persisting indexes, replaying incremental updates, or using TurboVec CPU search paths.

📝 How does it solve it?

  • Adds an IdMapIndex API for embedding vector search.
  • Adds native C++/N-API bindings around ggml-vector-index.
  • Supports q4, q8, and f32 storage through bitWidth: 4 | 8 | 32.
  • Adds exact top-k dot-product search with stable uint64 external IDs.
  • Adds filtered search and reusable prepared filters.
  • Adds IVF index build/search support for approximate CPU search.
  • Adds mmap-backed loading for read-only persisted indexes.
  • Adds delta log support with addLogged, removeLogged, loadWithDelta, and compactDelta.
  • Adds deterministic native cleanup with explicit dispose() for indexes and filters.
  • Pins the qvac-fabric overlay to the TurboVec CPU-capable commit.
  • Updates JS and TypeScript declarations for the full CPU API surface.
  • Adds integration coverage for persistence, q4/q8/f32 search, filters, IVF, mmap, delta replay/compaction, disposal, and corrupt file handling.
  • Adds a CPU TurboVec benchmark script for measuring ingest, exact search, IVF search, persistence, filters, mmap, and delta overhead.

🧪 How was it tested?

  • bare-make generate
  • bare-make build
  • bare-make install
  • bare test/integration/id-map-index.test.js --exit
  • npm run lint

Focused IdMapIndex validation passed with the CPU TurboVec coverage for q4/q8/f32, filters, IVF, mmap, delta logs, and disposal behavior.

dev-nid added 3 commits July 10, 2026 16:29
- Add native vector index wrapper and Bare binding for IdMapIndex
- Expose JS and TypeScript APIs for add/search/remove/persist flows
- Add qvac-fabric overlay and integration coverage for the POC
- Point qvac-fabric overlay at the production turbovec branch
- Update IdMapIndex API for q8/f32 storage and .tvim v2 persistence
- Expand integration coverage for q8, f32, validation, and corrupt loads
- Update qvac-fabric overlay to the TurboVec production commit.
- Add q4, mmap, compact, filtered search, prepared filters, IVF, and delta log APIs.
- Harden native bindings for disposal, path handling, overflow checks, and typed-array validation.
- Expand IdMapIndex integration coverage for persistence, filters, IVF, mmap, delta replay/compaction, and corrupt files.
@dev-nid dev-nid requested review from a team as code owners July 15, 2026 19:46
@github-actions

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

@dev-nid dev-nid marked this pull request as draft July 15, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant