Skip to content

Commit 1391ebc

Browse files
anvansterclaude
andcommitted
docs(embed): note static model ships bundled in VS Code extension
The VSIX bundles jina-code-static-256 and the extension auto-selects it (extension.ts), so `static` needs zero setup in VS Code. CLI/MCP keep the CODEGRAPH_STATIC_MODEL path instructions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f0a6dbb commit 1391ebc

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@ Static (model2vec) embeddings replace the ONNX transformer with a token→vector
9090
lookup table: indexing is **~100× faster** (this repo's 5,873 symbols embed in
9191
~1 s vs ~3.4 min with BGE) and there's **no ONNX runtime or 1.5 GB RAM gate**.
9292
Retrieval stays **hybrid (BM25 + semantic)**, so end-to-end quality is **~90% of
93-
BGE**. It needs a local model directory (`config.json` + `tokenizer.json` +
94-
`model.safetensors`):
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
95+
(`config.json` + `tokenizer.json` + `model.safetensors`):
9596

9697
- Point at it with `CODEGRAPH_STATIC_MODEL=/path/to/model` (or the VS Code
97-
`codegraph.staticModelPath` setting). Default:
98+
`codegraph.staticModelPath` setting to override the bundled model). Default:
9899
`~/.codegraph/static_models/jina-code-static-256`.
99100
- Distill one from any sentence-transformer (Apache-2.0 Jina-Code by default) in
100101
~30 s on CPU: `python scripts/distill_static_model.py`.

vscode/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The extension starts the server automatically and registers all tools as Languag
4545
|------|---------|-------------|
4646
| `--workspace <path>` | current dir | Directories to index (repeatable for multi-project) |
4747
| `--exclude <dir>` || Directories to skip (repeatable) |
48-
| `--embedding-model <model>` | `bge-small` | `bge-small` (384d, fast), `jina-code-v2` (768d, 6x slower), or `static` (model2vec, 256d — ~100× faster indexing, no ONNX, ~90% of BGE quality in hybrid search; set `codegraph.staticModelPath`) |
48+
| `--embedding-model <model>` | `bge-small` | `bge-small` (384d, fast), `jina-code-v2` (768d, 6x slower), or `static` (model2vec, 256d — ~100× faster indexing, no ONNX, ~90% of BGE quality in hybrid search; the model ships bundled in the extension, so no setup is needed) |
4949
| `--full-body-embedding` | `true` | Embed full function body (~50 lines) for better semantic search and duplicate detection |
5050
| `--max-files <n>` | 5000 | Maximum files to index |
5151

@@ -56,8 +56,8 @@ The extension starts the server automatically and registers all tools as Languag
5656
"codegraph.indexOnStartup": true,
5757
"codegraph.indexPaths": ["/path/to/project-a", "/path/to/project-b"],
5858
"codegraph.excludePatterns": ["**/cmake-build-debug/**", "**/generated/**"],
59-
"codegraph.embeddingModel": "bge-small", // or "static" for ~100× faster indexing
60-
"codegraph.staticModelPath": "", // model2vec model dir when embeddingModel is "static"
59+
"codegraph.embeddingModel": "bge-small", // or "static" for ~100× faster indexing (model bundled, no path needed)
60+
"codegraph.staticModelPath": "", // optional: override the bundled model2vec dir
6161
"codegraph.maxFileSizeKB": 1024,
6262
"codegraph.debug": false
6363
}

0 commit comments

Comments
 (0)