Skip to content

feat: port khive-hnsw — HNSW with INT8 quantized two-phase search#301

Merged
ohdearquant merged 5 commits into
mainfrom
feat/port-khive-hnsw
May 22, 2026
Merged

feat: port khive-hnsw — HNSW with INT8 quantized two-phase search#301
ohdearquant merged 5 commits into
mainfrom
feat/port-khive-hnsw

Conversation

@ohdearquant
Copy link
Copy Markdown
Owner

Summary

  • Ports HNSW index from khive-internal
  • Arena-based node storage, INT8 quantized coarse search with full-precision reranking
  • Checkpoint/restore, alias management for zero-downtime index swaps, batch build
  • ~9.4K LOC, 173 tests pass

Split from #297 (staging). Leaf crate — only depends on existing khive-score + khive-types.

Test plan

  • cargo check -p khive-hnsw clean
  • cargo test -p khive-hnsw — 173 passed

🤖 Generated with Claude Code

Ports HNSW index from khive-internal. Arena-based node storage, INT8
quantized coarse search with full-precision reranking, checkpoint/restore,
alias management for zero-downtime index swaps, batch build support.

~9.4K LOC, 173 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ohdearquant and others added 3 commits May 22, 2026 13:15
- Resolve workspace Cargo.toml conflict (add fusion + bm25 members)
- Fix module_inception: allow clippy lint on arena/mod.rs
- Fix doc list indentation in arena.rs
- Fix needless_range_loop: use iter().enumerate() for old_to_new
- Fix needless_range_loop: use iter().enumerate() for dists batch
- Allow too_many_arguments on search_layer_inner_ctx (perf-critical)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace is_err() + unwrap_err() with if-let pattern
- Replace redundant closure with function reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- bm25: field_reassign_with_default in tokenizer test
- bm25: unnecessary_unwrap in budget test
- bm25: new_without_default on RecordingSink
- bm25: needless_range_loop in score_batch test
- All workspace clippy --all-targets clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohdearquant ohdearquant merged commit 5fceab7 into main May 22, 2026
3 checks passed
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