Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep (opens in a new tab)github.com
445 pointsSemble is our solution for this. It combines static Model2Vec embeddings (using our latest static model: potion-code-16M) with BM25, fused via RRF and reranked with code-aware signals. Everything runs on CPU since there's no transformers involved. On our benchmark of ~1250 query/document pairs across 63 repos and 19 languages, it uses 98% fewer tokens than grep+read and reaches 99% of the retrieval quality of a 137M-parameter code-trained transformer, while being ~200x faster.
Main features:
- Token-efficient: 98% fewer tokens than grep+read
- Fast: ~250ms to index a typical repo on our benchmark, ~1.5ms per query on CPU (very large repos may take longer)
- Accurate: 0.854 NDCG@10, 99% of the best transformer setup we tested
- MCP server: drop-in for Claude Code, Cursor, Codex, OpenCode
- Zero config: no API keys, no GPU, no external services
Install in Claude Code with:
claude mcp add semble -s user -- uvx --from "semble[mcp]" semble
Or check our README for other installation instructions, benchmarks, and methodology:
Semble: https://github.com/MinishLab/semble
Benchmarks: https://github.com/MinishLab/semble/tree/main/benchmarks
Model: https://huggingface.co/minishlab/potion-code-16M
Let us know if you have any feedback or questions!
Comments (151) 75 threads
Show all comments
Showing thread 7 of 75
I found a nice workaround which is that you can just dump the whole directory into context, as a startup hook. So then Claude skips the "fumble around blindly in the dark" portion of every task. (I've also seen a great project that worked on bigger repos where it'll give the model an outline with stubs, though I forget what it was called.)
It just does what I need and no more: load code into context, append my question or instruction, call LLM, apply patches. Repeat.
I haven't used Aider itself though, maybe it does that too.
My harness was nice relative to Claude Code and Codex because, it doesn't need to poke around the filesystem (cause I have small repos and dump the whole thing), and it makes all edits simultaneously (doesn't need to edit one file at a time).
It reads all files and edits all necessary files in a single round trip.
The really nice thing is that when you're making many small fine grained changes like that, you can use a much smaller, faster, cheaper model.
And if it's fast enough, it actually becomes a real-time activity. It's not "prompt, wait..." but "prompt, immediately get the result." It's interactive. You stay active and engaged. It's great.
Although for small codebases it also holds that whatever you would like to find it easy to find, so search still might help you with cost