semble 0.7.2__tar.gz → 0.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. {semble-0.7.2 → semble-0.7.4}/PKG-INFO +5 -5
  2. {semble-0.7.2 → semble-0.7.4}/README.md +4 -4
  3. {semble-0.7.2 → semble-0.7.4}/src/semble/index/create.py +8 -4
  4. {semble-0.7.2 → semble-0.7.4}/src/semble/utils.py +1 -1
  5. {semble-0.7.2 → semble-0.7.4}/src/semble/version.py +1 -1
  6. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/PKG-INFO +5 -5
  7. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/scm_file_list.json +11 -0
  8. semble-0.7.4/src/semble.egg-info/scm_version.json +8 -0
  9. {semble-0.7.2 → semble-0.7.4}/tests/index/test_create.py +13 -0
  10. {semble-0.7.2 → semble-0.7.4}/tests/test_search.py +1 -1
  11. semble-0.7.2/src/semble.egg-info/scm_version.json +0 -8
  12. {semble-0.7.2 → semble-0.7.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  13. {semble-0.7.2 → semble-0.7.4}/.github/workflows/ci.yaml +0 -0
  14. {semble-0.7.2 → semble-0.7.4}/.github/workflows/release.yaml +0 -0
  15. {semble-0.7.2 → semble-0.7.4}/.gitignore +0 -0
  16. {semble-0.7.2 → semble-0.7.4}/.pre-commit-config.yaml +0 -0
  17. {semble-0.7.2 → semble-0.7.4}/CITATION.cff +0 -0
  18. {semble-0.7.2 → semble-0.7.4}/CONTRIBUTING.md +0 -0
  19. {semble-0.7.2 → semble-0.7.4}/LICENSE +0 -0
  20. {semble-0.7.2 → semble-0.7.4}/MANIFEST.in +0 -0
  21. {semble-0.7.2 → semble-0.7.4}/Makefile +0 -0
  22. {semble-0.7.2 → semble-0.7.4}/docs/installation.md +0 -0
  23. {semble-0.7.2 → semble-0.7.4}/pyproject.toml +0 -0
  24. {semble-0.7.2 → semble-0.7.4}/scripts/demo/dark.tape +0 -0
  25. {semble-0.7.2 → semble-0.7.4}/scripts/demo/light.tape +0 -0
  26. {semble-0.7.2 → semble-0.7.4}/scripts/demo/record.sh +0 -0
  27. {semble-0.7.2 → semble-0.7.4}/setup.cfg +0 -0
  28. {semble-0.7.2 → semble-0.7.4}/src/semble/__init__.py +0 -0
  29. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/antigravity.md +0 -0
  30. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/claude.md +0 -0
  31. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/codex.toml +0 -0
  32. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/commandcode.md +0 -0
  33. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/copilot.md +0 -0
  34. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/cursor.md +0 -0
  35. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/gemini.md +0 -0
  36. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/grok.md +0 -0
  37. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/kilo.md +0 -0
  38. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/kiro.md +0 -0
  39. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/opencode.md +0 -0
  40. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/pi.md +0 -0
  41. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/qwen.md +0 -0
  42. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/reasonix.md +0 -0
  43. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/skill.md +0 -0
  44. {semble-0.7.2 → semble-0.7.4}/src/semble/agents/zcode.md +0 -0
  45. {semble-0.7.2 → semble-0.7.4}/src/semble/cache.py +0 -0
  46. {semble-0.7.2 → semble-0.7.4}/src/semble/chunking/__init__.py +0 -0
  47. {semble-0.7.2 → semble-0.7.4}/src/semble/chunking/chunking.py +0 -0
  48. {semble-0.7.2 → semble-0.7.4}/src/semble/chunking/core.py +0 -0
  49. {semble-0.7.2 → semble-0.7.4}/src/semble/cli.py +0 -0
  50. {semble-0.7.2 → semble-0.7.4}/src/semble/index/__init__.py +0 -0
  51. {semble-0.7.2 → semble-0.7.4}/src/semble/index/bm25.py +0 -0
  52. {semble-0.7.2 → semble-0.7.4}/src/semble/index/dense.py +0 -0
  53. {semble-0.7.2 → semble-0.7.4}/src/semble/index/file_walker.py +0 -0
  54. {semble-0.7.2 → semble-0.7.4}/src/semble/index/files.py +0 -0
  55. {semble-0.7.2 → semble-0.7.4}/src/semble/index/index.py +0 -0
  56. {semble-0.7.2 → semble-0.7.4}/src/semble/index/sparse.py +0 -0
  57. {semble-0.7.2 → semble-0.7.4}/src/semble/index/types.py +0 -0
  58. {semble-0.7.2 → semble-0.7.4}/src/semble/installer/__init__.py +0 -0
  59. {semble-0.7.2 → semble-0.7.4}/src/semble/installer/agents.py +0 -0
  60. {semble-0.7.2 → semble-0.7.4}/src/semble/installer/config.py +0 -0
  61. {semble-0.7.2 → semble-0.7.4}/src/semble/installer/installer.py +0 -0
  62. {semble-0.7.2 → semble-0.7.4}/src/semble/mcp.py +0 -0
  63. {semble-0.7.2 → semble-0.7.4}/src/semble/py.typed +0 -0
  64. {semble-0.7.2 → semble-0.7.4}/src/semble/ranking/__init__.py +0 -0
  65. {semble-0.7.2 → semble-0.7.4}/src/semble/ranking/boosting.py +0 -0
  66. {semble-0.7.2 → semble-0.7.4}/src/semble/ranking/penalties.py +0 -0
  67. {semble-0.7.2 → semble-0.7.4}/src/semble/search.py +0 -0
  68. {semble-0.7.2 → semble-0.7.4}/src/semble/stats.py +0 -0
  69. {semble-0.7.2 → semble-0.7.4}/src/semble/tokens.py +0 -0
  70. {semble-0.7.2 → semble-0.7.4}/src/semble/types.py +0 -0
  71. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/SOURCES.txt +0 -0
  72. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/dependency_links.txt +0 -0
  73. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/entry_points.txt +0 -0
  74. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/requires.txt +0 -0
  75. {semble-0.7.2 → semble-0.7.4}/src/semble.egg-info/top_level.txt +0 -0
  76. {semble-0.7.2 → semble-0.7.4}/tests/__init__.py +0 -0
  77. {semble-0.7.2 → semble-0.7.4}/tests/conftest.py +0 -0
  78. {semble-0.7.2 → semble-0.7.4}/tests/index/test_bm25.py +0 -0
  79. {semble-0.7.2 → semble-0.7.4}/tests/index/test_dense.py +0 -0
  80. {semble-0.7.2 → semble-0.7.4}/tests/index/test_index.py +0 -0
  81. {semble-0.7.2 → semble-0.7.4}/tests/test_cache.py +0 -0
  82. {semble-0.7.2 → semble-0.7.4}/tests/test_chunker.py +0 -0
  83. {semble-0.7.2 → semble-0.7.4}/tests/test_cli.py +0 -0
  84. {semble-0.7.2 → semble-0.7.4}/tests/test_file_walker.py +0 -0
  85. {semble-0.7.2 → semble-0.7.4}/tests/test_files.py +0 -0
  86. {semble-0.7.2 → semble-0.7.4}/tests/test_git.py +0 -0
  87. {semble-0.7.2 → semble-0.7.4}/tests/test_installer.py +0 -0
  88. {semble-0.7.2 → semble-0.7.4}/tests/test_mcp.py +0 -0
  89. {semble-0.7.2 → semble-0.7.4}/tests/test_ranking.py +0 -0
  90. {semble-0.7.2 → semble-0.7.4}/tests/test_stats.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semble
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: Fast and Accurate Code Search for Agents
5
5
  Author-email: Thomas van Dongen <thomasvdongen@proton.me>, Stéphan Tulkens <stephantul@gmail.com>
6
6
  License: MIT License
@@ -96,7 +96,7 @@ Dynamic: license-file
96
96
 
97
97
  </div>
98
98
 
99
- Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~480x faster and querying ~23x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
99
+ Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~560x faster and querying ~21x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
100
100
 
101
101
  <picture>
102
102
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MinishLab/semble/main/assets/images/demo-dark.gif">
@@ -151,7 +151,7 @@ semble install --agent claude --type mcp subagent --yes
151
151
  ## Main Features
152
152
 
153
153
  - **Fast**: indexes an average repo in ~500 ms and answers queries in ~1 ms, all on CPU.
154
- - **Accurate**: NDCG@10 of 0.855 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
154
+ - **Accurate**: NDCG@10 of 0.850 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
155
155
  - **Token-efficient**: returns only the relevant chunks, using [~99% fewer tokens than grep+read](#benchmarks).
156
156
  - **Zero setup**: runs on CPU with no API keys, GPU, or external services required.
157
157
  - **MCP server**: works with Claude Code, Cursor, Codex, OpenCode, VS Code, and any other MCP-compatible agent.
@@ -334,11 +334,11 @@ We benchmark quality and speed across ~1,250 queries over 63 repositories in 19
334
334
  </tr>
335
335
  </table>
336
336
 
337
- The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 480x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
337
+ The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 560x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
338
338
 
339
339
  ## How it works
340
340
 
341
- Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [potion-code-16M-v2](https://huggingface.co/minishlab/potion-code-16M-v2) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
341
+ Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [blink-code-16M-int8](https://huggingface.co/minishlab/blink-code-16M-int8) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
342
342
 
343
343
  After fusing, results are reranked with a set of code-aware signals:
344
344
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  </div>
26
26
 
27
- Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~480x faster and querying ~23x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
27
+ Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~560x faster and querying ~21x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
28
28
 
29
29
  <picture>
30
30
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MinishLab/semble/main/assets/images/demo-dark.gif">
@@ -79,7 +79,7 @@ semble install --agent claude --type mcp subagent --yes
79
79
  ## Main Features
80
80
 
81
81
  - **Fast**: indexes an average repo in ~500 ms and answers queries in ~1 ms, all on CPU.
82
- - **Accurate**: NDCG@10 of 0.855 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
82
+ - **Accurate**: NDCG@10 of 0.850 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
83
83
  - **Token-efficient**: returns only the relevant chunks, using [~99% fewer tokens than grep+read](#benchmarks).
84
84
  - **Zero setup**: runs on CPU with no API keys, GPU, or external services required.
85
85
  - **MCP server**: works with Claude Code, Cursor, Codex, OpenCode, VS Code, and any other MCP-compatible agent.
@@ -262,11 +262,11 @@ We benchmark quality and speed across ~1,250 queries over 63 repositories in 19
262
262
  </tr>
263
263
  </table>
264
264
 
265
- The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 480x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
265
+ The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 560x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
266
266
 
267
267
  ## How it works
268
268
 
269
- Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [potion-code-16M-v2](https://huggingface.co/minishlab/potion-code-16M-v2) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
269
+ Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [blink-code-16M-int8](https://huggingface.co/minishlab/blink-code-16M-int8) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
270
270
 
271
271
  After fusing, results are reranked with a set of code-aware signals:
272
272
 
@@ -86,12 +86,16 @@ def _init_worker() -> None:
86
86
  def _chunk_files(files: list[tuple[Path, str]]) -> Generator[_ChunkedFile | None, None, None]:
87
87
  """Chunk files in order, in SEMBLE_INDEX_WORKERS worker processes when there are enough files."""
88
88
  workers = int(os.environ.get("SEMBLE_INDEX_WORKERS", 0))
89
- if workers == 0 or len(files) < _MIN_FILES_FOR_PROCESSES:
89
+ executor = None
90
+ if workers > 0 and len(files) >= _MIN_FILES_FOR_PROCESSES:
91
+ # Sandboxes (e.g. macOS Seatbelt) can deny the semaphore checks the pool runs on creation.
92
+ with contextlib.suppress(OSError, NotImplementedError):
93
+ executor = ProcessPoolExecutor(
94
+ workers, mp_context=multiprocessing.get_context("spawn"), initializer=_init_worker
95
+ )
96
+ if executor is None:
90
97
  yield from itertools.starmap(_chunk_file, files)
91
98
  else:
92
- executor = ProcessPoolExecutor(
93
- workers, mp_context=multiprocessing.get_context("spawn"), initializer=_init_worker
94
- )
95
99
  try:
96
100
  submitted = (executor.submit(_chunk_file, *file) for file in files)
97
101
  pending = deque(itertools.islice(submitted, _MAX_FILES_IN_FLIGHT))
@@ -8,7 +8,7 @@ from semble.types import Chunk, SearchResult
8
8
 
9
9
  _GIT_URL_SCHEMES = ("https://", "http://", "ssh://", "git://", "git+ssh://", "file://")
10
10
  _SCP_GIT_URL_RE = re.compile(r"^[\w.-]+@[\w.-]+:(?!/)")
11
- DEFAULT_MODEL_NAME = "minishlab/potion-code-16M-v2"
11
+ DEFAULT_MODEL_NAME = "minishlab/blink-code-16M-int8"
12
12
 
13
13
 
14
14
  def is_git_url(path: str) -> bool:
@@ -1,2 +1,2 @@
1
- __version_triple__ = (0, 7, 2)
1
+ __version_triple__ = (0, 7, 4)
2
2
  __version__ = ".".join(map(str, __version_triple__))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semble
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: Fast and Accurate Code Search for Agents
5
5
  Author-email: Thomas van Dongen <thomasvdongen@proton.me>, Stéphan Tulkens <stephantul@gmail.com>
6
6
  License: MIT License
@@ -96,7 +96,7 @@ Dynamic: license-file
96
96
 
97
97
  </div>
98
98
 
99
- Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~480x faster and querying ~23x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
99
+ Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~560x faster and querying ~21x faster (see [benchmarks](#benchmarks)). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.
100
100
 
101
101
  <picture>
102
102
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/MinishLab/semble/main/assets/images/demo-dark.gif">
@@ -151,7 +151,7 @@ semble install --agent claude --type mcp subagent --yes
151
151
  ## Main Features
152
152
 
153
153
  - **Fast**: indexes an average repo in ~500 ms and answers queries in ~1 ms, all on CPU.
154
- - **Accurate**: NDCG@10 of 0.855 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
154
+ - **Accurate**: NDCG@10 of 0.850 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost.
155
155
  - **Token-efficient**: returns only the relevant chunks, using [~99% fewer tokens than grep+read](#benchmarks).
156
156
  - **Zero setup**: runs on CPU with no API keys, GPU, or external services required.
157
157
  - **MCP server**: works with Claude Code, Cursor, Codex, OpenCode, VS Code, and any other MCP-compatible agent.
@@ -334,11 +334,11 @@ We benchmark quality and speed across ~1,250 queries over 63 repositories in 19
334
334
  </tr>
335
335
  </table>
336
336
 
337
- The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 480x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
337
+ The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter [CodeRankEmbed](https://huggingface.co/nomic-ai/CodeRankEmbed) while indexing 560x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 96% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See [benchmarks](benchmarks/README.md) for per-language results, ablations, and full methodology.
338
338
 
339
339
  ## How it works
340
340
 
341
- Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [potion-code-16M-v2](https://huggingface.co/minishlab/potion-code-16M-v2) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
341
+ Semble splits each file into code-aware chunks using [tree-sitter](https://github.com/tree-sitter/py-tree-sitter), then scores every query against the chunks with two complementary retrievers: static [Model2Vec](https://github.com/MinishLab/model2vec) embeddings using the code-specialized [blink-code-16M-int8](https://huggingface.co/minishlab/blink-code-16M-int8) model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).
342
342
 
343
343
  After fusing, results are reranked with a set of code-aware signals:
344
344
 
@@ -107,25 +107,36 @@
107
107
  "benchmarks/results/grepai-715563a812c3.json",
108
108
  "benchmarks/results/probe-715563a812c3.json",
109
109
  "benchmarks/results/ripgrep-fixed-strings-0332378809c5.json",
110
+ "benchmarks/results/semble-ablations-41f9d532f71d.json",
110
111
  "benchmarks/results/semble-ablations-5fbcd035d594.json",
112
+ "benchmarks/results/semble-ablations-8e40653de0d6.json",
111
113
  "benchmarks/results/semble-ablations-a772a37d558c.json",
112
114
  "benchmarks/results/semble-ablations-dceb3601a227.json",
115
+ "benchmarks/results/semble-ablations-e7f1ad8735fc.json",
116
+ "benchmarks/results/semble-hybrid-41f9d532f71d.json",
113
117
  "benchmarks/results/semble-hybrid-5f32cd3b58c1.json",
114
118
  "benchmarks/results/semble-hybrid-5fbcd035d594.json",
115
119
  "benchmarks/results/semble-hybrid-64fa8cf54011.json",
120
+ "benchmarks/results/semble-hybrid-8e40653de0d6.json",
116
121
  "benchmarks/results/semble-hybrid-a772a37d558c.json",
117
122
  "benchmarks/results/semble-hybrid-dceb3601a227.json",
123
+ "benchmarks/results/semble-hybrid-e7f1ad8735fc.json",
118
124
  "benchmarks/results/speed-0e2d85215c7e.json",
119
125
  "benchmarks/results/speed-14bf36d03f0c.json",
120
126
  "benchmarks/results/speed-204547031f12.json",
127
+ "benchmarks/results/speed-41f9d532f71d.json",
121
128
  "benchmarks/results/speed-5fbcd035d594.json",
122
129
  "benchmarks/results/speed-5fcc8a0a7b89.json",
130
+ "benchmarks/results/speed-8e40653de0d6.json",
123
131
  "benchmarks/results/speed-906319556a46.json",
124
132
  "benchmarks/results/speed-b468bbf0a1a5.json",
133
+ "benchmarks/results/speed-e7f1ad8735fc.json",
125
134
  "benchmarks/results/speed-eb6676ad14ec.json",
126
135
  "benchmarks/results/token-efficiency-0e2d85215c7e.json",
127
136
  "benchmarks/results/token-efficiency-5ef8e76ffaef.json",
128
137
  "benchmarks/results/token-efficiency-5fbcd035d594.json",
138
+ "benchmarks/results/token-efficiency-8e40653de0d6.json",
139
+ "benchmarks/results/token-efficiency-e7f1ad8735fc.json",
129
140
  "benchmarks/results/zvecgrep-6bbbd322fd6e.json",
130
141
  "benchmarks/run_benchmark.py",
131
142
  "benchmarks/speed_benchmark.py",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.7.4",
3
+ "distance": 0,
4
+ "node": "g24ce4eb64f9646049ce5528d1fa6638c4f78f030",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-25"
8
+ }
@@ -126,6 +126,19 @@ def test_unreadable_file_is_skipped(mock_model: Any, tmp_path: Path) -> None:
126
126
  assert list(manifest) == ["a.py"]
127
127
 
128
128
 
129
+ def test_chunks_in_process_when_pool_is_denied(
130
+ mock_model: Any, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
131
+ ) -> None:
132
+ """Files are chunked in the main process when a sandbox denies creating the worker pool."""
133
+ monkeypatch.setattr(create, "_MIN_FILES_FOR_PROCESSES", 0)
134
+ monkeypatch.setenv("SEMBLE_INDEX_WORKERS", "2")
135
+ _write_files(tmp_path, {"a.py": "def a():\n return 1\n"})
136
+
137
+ with patch.object(create, "ProcessPoolExecutor", side_effect=PermissionError(1, "Operation not permitted")):
138
+ _, _, _, manifest = create_index_from_path(tmp_path, mock_model, display_root=tmp_path)
139
+ assert list(manifest) == ["a.py"]
140
+
141
+
129
142
  def test_worker_exits_with_parent(monkeypatch: pytest.MonkeyPatch) -> None:
130
143
  """A chunking worker exits once its parent process is gone."""
131
144
  parent_end, worker_end = multiprocessing.Pipe()
@@ -141,7 +141,7 @@ def test_sort_top_k() -> None:
141
141
  @pytest.mark.parametrize(
142
142
  ("model_path", "expected_call_arg", "incomplete_cache"),
143
143
  [
144
- (None, "minishlab/potion-code-16M-v2", False), # default model
144
+ (None, "minishlab/blink-code-16M-int8", False), # default model
145
145
  ("some/custom/model", "some/custom/model", False), # explicit path forwarded
146
146
  ("broken/model", "broken/model", True), # incomplete cache retries through the Hub
147
147
  ],
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.7.2",
3
- "distance": 0,
4
- "node": "gbb746c9c79925760df8a3759fcca658734e2eaf6",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-11-03"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes