## Phase 5: Voyage-4-Nano ONNX (Opt-in) ### Scope - `ort` crate dependency (ONNX Runtime) - First-use model download (~1.4GB, auto-cache like fastembed) - `src/embed/voyage.rs` — Voyage-4-Nano wrapper (340M params, 1024d, Matryoshka) - Config: `embedding.tier: local` activates Voyage-4-Nano - Re-index with new model: `cora index --rebuild` ### Specs - Model: voyageai/voyage-4-nano (Apache-2.0) - ONNX: onnx-community/voyage-4-nano-ONNX (~1.41GB) - Architecture: Qwen3ForCausalLM, bidirectional attention - Context: 32K tokens, Dimensions: 1024 (Matryoshka: 256/512/1024/2048) ### Trade-offs - **Quality:** +15-25% retrieval accuracy over static tokens (full contextual understanding) - **Cost:** +1.5-2GB RAM, +3-7min index time (1695 symbols × 200ms) - **Binary:** +~5MB (ort crate), model downloaded on first use (not in binary) - **Feature flag:** `--features voyage-nano` to keep default build light ### Implementation Checklist - [ ] Add `ort` crate (feature-gated: `voyage-nano`) - [ ] Create `src/embed/voyage.rs` — model download, load, embed - [ ] Wire `embedding.tier: local` to dispatch voyage.rs - [ ] Handle dim mismatch (768→1024) on tier switch — reindex prompt - [ ] Model download UX: progress indication, cache dir (`~/.codecora/cora-code/models/`) - [ ] Tests: embed single, embed batch, dim validation ### Effort ~400 lines ### Depends On - Phase 3 (usearch index, embed wiring) — this issue - Phase 4 (optional, no hard dep) ### Status **DEFERRED** — build when there is user demand or `cora review --brain` needs better precision. Static tokens + hybrid search already provide 80% of value. **Depends on:** #359 (Phase 3) --- **Status:** DEFERRED
Activity
ajianaz commentedon Jul 28, 2026
Closing — deferred indefinitely. Voyage-4-Nano ONNX adds significant dependency weight. Current 256d hash embedding is sufficient for code search.