You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--embedding-model <model>`|`bge-small`|`bge-small` (384d, fast), `jina-code-v2` (768d, 6× slower), `granite-97m` (384d, 32K ctx, ~3× slower), or `static` (model2vec, 256d — ~100× faster indexing, no ONNX; needs a local model dir, see below) |
81
81
|`--full-body-embedding`|`true`| Embed full function body (~50 lines) for better semantic search and duplicate detection |
82
82
|`--max-files <n>`| 5000 | Maximum files to index |
83
83
|`--profile <name>`|`all`| Filter the exposed MCP tool surface to a named subset (see below) |
84
84
|`--graph-only`| off | Skip embedding generation — build the graph and serve structural tools only. No ONNX model load, 10-50× faster indexing. Semantic search unavailable. For CI / one-shot graph queries. |
85
85
|`--run-tool <name>`| — | One-shot mode: index, run a single tool, print its result, exit. No MCP handshake. Pair with `--tool-args '<json>'`. |
86
86
87
+
#### `--embedding-model static` — model2vec fast indexing
88
+
89
+
Static (model2vec) embeddings replace the ONNX transformer with a token→vector
90
+
lookup table: indexing is **~100× faster** (this repo's 5,873 symbols embed in
91
+
~1 s vs ~3.4 min with BGE) and there's **no ONNX runtime or 1.5 GB RAM gate**.
92
+
Retrieval stays **hybrid (BM25 + semantic)**, so end-to-end quality is **~90% of
93
+
BGE**. The VS Code extension ships the model bundled, so `static` works there
94
+
with no setup. For the CLI/MCP server it needs a local model directory
- Distill one from any sentence-transformer (Apache-2.0 Jina-Code by default) in
101
+
~30 s on CPU: `python scripts/distill_static_model.py`.
102
+
87
103
#### `--profile` — narrow the MCP tool surface
88
104
89
105
The full 32-tool surface is convenient but inflates the agent's prompt-context cost. A profile exposes only the slice you need (also settable via the `CODEGRAPH_TOOL_PROFILE` env var):
@@ -103,7 +119,8 @@ The full 32-tool surface is convenient but inflates the agent's prompt-context c
0 commit comments