Repository navigation
chore(spike): keep the embedding and vector-layout spikes as a record - #759
Merged
Merged
Conversation
Throwaway crate outside the cora build that embeds this repository's functions with the static code embedding potion-code-16M-v2 and reports load time, throughput, CPU time and memory, plus a few retrieval samples. The results and caveats are in its README; nothing in cora itself changes.
…746) Extends the potion-code-16M-v2 spike into a measured comparison: an offline harness scores bm25, cora's hashing and pretrained backends, potion-code v1/v2, general potion models and int8 variants, alone and fused with bm25 by reciprocal rank fusion, on 4 sets (39 hand-written questions and 400 doc comments on this repository, 600 doc comments on 8 Rust crates, 600 docstrings from the Python stdlib) plus keyword-style variants, over both name+signature documents (what cora indexes) and whole bodies. Results carry bootstrap intervals and paired differences; cost is measured per backend; the real cora brain is scored on the same queries as a cross-check. potion-code-v2 is a net gain on every set; cora's current vectors at half weight are neutral to harmful outside this repository. A transformer model could not be tested because the sandbox blocks its download; a probe crate is included. Nothing in cora itself changes.
…ject (#746) Measures, on 176 real projects (127,400 functions embedded with the real potion-code-16M-v2 model and cora's own usearch and vecq settings), whether the shared vector index hurts retrieval and what a per-project vecq layout would gain. The shared file loses up to 29% of MRR and returns no candidate for up to a quarter of the queries when many projects share it, never frees the vectors of deleted symbols, and costs 149 MB of memory in every process; one vecq file per project matches the exact ceiling, is 4.3x smaller, and loads about 300 to 400x faster and re-indexes 6 to 9x faster. Nothing in cora itself changes.
…t zero Found by Cora Review on the pull request. Refs #746.
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.
What
Adds the two throwaway spikes under
spikes/as a record of the evidence behind the merged decisions. Neither is part of the cora build (each is a standalone crate with its own[workspace]).spikes/potion-code/: local code embeddings measured against cora's earlier backends on 1,639 queries (hand-written questions and doc comments of this repository, 8 other Rust crates and the Python standard library), includingpotion-code-16M-v2throughmodel2vec-rs. Results inRESULTS.md.spikes/vector-layout/: one global vector file for all projects against one file per project, on 176 real projects (127,400 functions): quality at several--limitvalues, speed, load time and memory. Raw results inresults/.Why
These spikes decided the default embedding model (#749, #755) and the per-project vector layout (#752). Keeping the harness and the raw numbers lets the claims in those PRs and in
docs/code-intelligence.mdbe reproduced or challenged later. Refs #746.Testing
src/changes; the root crate builds and tests as before (CI).cargo run --releaseinside its directory, see its README); the results files are the outputs of those runs.Generated by Claude Code