Repository navigation
feat: add native ONNX all-MiniLM embedder - #366
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #360
Closes #361
What changed
onnx/all-minilm-l6-v2as a native embed provider in the Cortex embed pipeline~/.cortex/models/embed/all-minilm-l6-v2/cortex embed,search,ask,answer, the background embed worker,cortex embed --status, andcortex doctordocs/research/onnx-embedder-benchmark-2026-03-24.mdWhy this change exists
Cortex already had native ONNX runtime support for reranking, but embeddings were still the last external dependency. This change makes semantic memory work with zero Ollama process and zero API keys on a fresh machine while still respecting an explicit configured provider when one exists.
Touched surfaces
internal/embedcmd/cortexdocs/research/onnx-embedder-benchmark-2026-03-24.mdTests run
go test ./...Verification and benchmark notes
cortex embed --statusnow reports the resolved provider, source, model path, status, and dimension compatibilitycortex doctor --jsonnow reports the resolved embedder and surfaces config/store dimension mismatches5694memories in69199 ms82.3 emb/s18embeddings in180s, which projects to about15.8h; that is documented explicitly as an extrapolation, not a completed full pass0.991, average candidate-vector cosine0.986, and identical top-1 retrieval on5/5sampled queriesRisk
ollama/nomic-embed-textwhile the stored live corpus is384d; the new doctor/status reporting makes that visible, but users with stale explicit configs may need to re-embedDocs / release-note impact