chore: native ANN vector index on the Tensors stack; drop external FaissNet#1899
chore: native ANN vector index on the Tensors stack; drop external FaissNet#1899ooples wants to merge 2 commits into
Conversation
…issNet Replaces the broken external FaissNet backend (its IVF/PQ path dies with a process-fatal "Cannot load mkl_def.2.dll") with a dependency-free native ANN index built on AiDotNet.Tensors' fused ANN kernels. - AnnVectorIndex<T> : IVectorIndex<T> — Flat/IVF/PQ/IVFPQ over Tensors' AnnIndex. Bridges the incremental Add/Remove/Search index contract onto a train-then- populate ANN index via a live-vector source of truth + lazy rebuild, and AttachGpu() dispatches to the fused GPU ANN kernels across all 7 backends, falling back to the managed CPU reference. Reuses the existing VectorIndexDocumentStore adapter, so it plugs into the RAG facade unchanged. - AiModelBuilder.ConfigureNativeAnnIndex(...) (on both IAiModelBuilder and the concrete builder) surfaces it from the facade with optional GPU acceleration. - Bump AiDotNet.Tensors 0.114.0 -> 0.118.0 (brings Tensors #824, the native ANN kernel stack — the gating dependency). - Remove the AiDotNet.Storage.Faiss project, its tests, the FaissNet package reference, and all solution/csproj wiring: the native path supersedes it and takes no external native dependency. Tests: AnnVectorIndexTests 9/9 green on net471 + net10 (exact flat NN, in-cluster recall for IVF/PQ/IVFPQ on separable clusters, Add/Remove/Clear/ AddBatch/cosine-normalization). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: Learn More: https://vercel.com/franklins-projects-02a0b5a0?upgradeToPro=build-rate-limit |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Commit messages auto-fixedOne or more commit messages did not follow Conventional Commits, so they were rewritten to comply (subject case, header length ≤ 100, valid type). Each commit and its diff were preserved — no squashing. The branch was force-pushed with the corrected messages. If you have local work on this branch, run |
f0c8f83 to
2bae3bb
Compare
|
🤖 PR Title Auto-Fixed Your PR title was automatically updated to follow Conventional Commits format. Original title: New title: Detected type: Valid types and their effects:
If the detected type is incorrect, you can manually edit the PR title. |
… feat/native-ann-store # Conflicts: # Directory.Packages.props
Native ANN vector index on the AiDotNet stack — replaces external FaissNet
Consumes the native fused ANN kernels from AiDotNet.Tensors #824 to give FAISS-style IVF/PQ/IVFPQ/Flat search with no external native dependency, and removes the broken FaissNet backend.
Why: FaissNet's IVF/PQ path is unusable — it ships an incomplete MKL redist and dies with a process-fatal
Intel MKL FATAL ERROR: Cannot load mkl_def.2.dllthat can't be caught. This PR moves the whole ANN stack onto AiDotNet's own Tensors kernels.What's here
AnnVectorIndex<T> : IVectorIndex<T>— Flat / IVF / PQ / IVFPQ over Tensors'AnnIndex. Bridges the incrementalAdd/Remove/Searchcontract onto a train-then-populate ANN index (live-vector source of truth + lazy rebuild), andAttachGpu(...)dispatches distance / assignment / PQ scans to the fused GPU ANN kernels (IAnnBackend) across all 7 backends, falling back to the managed CPU reference. Reuses the existingVectorIndexDocumentStoreadapter, so it plugs into the RAG facade unchanged.ConfigureNativeAnnIndex(...)on bothIAiModelBuilderand the concrete builder — surfaces the native index from the facade with optional GPU acceleration.AiDotNet.Tensors0.114.0 → 0.118.0 (the gating dependency: Tensors fix: allow setparameters on untrained time series models #824's native ANN kernel stack).AiDotNet.Storage.Faissproject, its tests, theFaissNetpackage reference, and all solution/csproj wiring — the native path supersedes it.Verification
AnnVectorIndexTests9/9 green on net471 + net10: exact flat NN, in-cluster recall for IVF/PQ/IVFPQ on separable clusters, Add/Remove/Clear/AddBatch, cosine normalization.Merge order
Base is
feat/rag-productionization(#1896) since the FaissNet code being removed was added there. Requires publishing AiDotNet.Tensors 0.118.0 (from Tensors PR #824) before CI restore goes green; verified locally against a 0.118.0 package built from that branch.Generated with Claude Code