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
Forward the selected device to Transformers.js and record the model-device identity in each search index. Reject incompatible indexes before queries can mix embedding spaces. Replace duplicated cache tests with API-level regression coverage.
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,21 +241,22 @@ The large default context can exceed memory for big models on constrained hardwa
241
241
242
242
### Embedding Model
243
243
244
-
`skilld search`is powered by a local embedding model. It runs offline through transformers.js — no API key, and no network traffic after the first download. Pick one under **Embedding model** in `skilld config`:
244
+
`skilld search`uses a local embedding model. It runs offline through transformers.js. It needs no API key or network after the first download. Pick one under **Embedding model** in `skilld config`:
245
245
246
246
| Model | Dimensions | Notes |
247
247
|-------|-----------:|-------|
248
248
|`bge-small-en-v1.5`| 384 | Default. Fastest to index, smallest download. |
249
249
|`bge-base-en-v1.5`| 768 | Balanced accuracy and speed. |
Larger models retrieve more accurately but cost more time and memory when indexing. Set `SKILLD_EMBED_MODEL` to override the saved setting for a single run:
252
+
Larger models retrieve more accurately but cost more time and memory when indexing. Set `SKILLD_EMBED_MODEL` to override the saved setting:
253
253
254
254
```bash
255
-
SKILLD_EMBED_MODEL=bge-m3 skilld add npm:vue
255
+
export SKILLD_EMBED_MODEL=bge-m3
256
+
skilld update --force
256
257
```
257
258
258
-
Search indexes store fixed-width vectors, so changing to a model with different dimensions strands existing indexes. Rebuild them after switching:
259
+
Each search index belongs to one model and device. Keep environment overrides set for both indexing and querying. Rebuild indexes after either setting changes:
259
260
260
261
```bash
261
262
skilld update --force
@@ -267,7 +268,7 @@ The embedding model runs on the CPU by default. **Embedding device** in `skilld
267
268
268
269
| Device | Notes |
269
270
|--------|-------|
270
-
|`auto`| Default. Lets transformers.js choose — CPU under Node. |
271
+
|`auto`| Default. Lets transformers.js choose, CPU under Node. |
271
272
|`cpu`| Always available, predictable. |
272
273
|`webgpu`| Fastest on Apple Silicon in testing. |
273
274
|`coreml`| Apple Neural Engine. Measured slower than CPU for these models. |
@@ -280,15 +281,16 @@ Measured on an Apple M5 Max, 120 documents, best of 3 after warm-up (docs/sec):
280
281
|`bge-base-en-v1.5`| 198 | 68 |**580**|
281
282
|`Xenova/bge-large-en-v1.5`| 71 | 9 |**201**|
282
283
283
-
WebGPU was 2.6-2.9x faster than CPU at every size, which means `bge-large` on WebGPU indexes faster than `bge-base`does on CPU — better retrieval for less wall-clock. CoreML was consistently slower.
284
+
WebGPU was 2.6 to 2.9 times faster than CPU at every size. `bge-large` on WebGPU indexed faster than `bge-base` on CPU. CoreML was consistently slower.
284
285
285
-
The ranking is hardware-specific, so benchmark before trusting a device on other machines. Override for a single run with `SKILLD_EMBED_DEVICE`:
286
+
The ranking is hardware-specific, so benchmark before trusting a device on other machines. Set `SKILLD_EMBED_DEVICE` to override the saved setting:
286
287
287
288
```bash
288
-
SKILLD_EMBED_DEVICE=cpu skilld update --force
289
+
export SKILLD_EMBED_DEVICE=cpu
290
+
skilld update --force
289
291
```
290
292
291
-
If a backend is unavailable, indexing fails to start — switch back to `auto`.
293
+
If a backend is unavailable, indexing fails to start. Switch back to `auto`.
thrownewSearchDepsUnavailableError(newError('FTS5 module not available'),'SQLite FTS5 module not available. Search indexing skipped. On Windows, run from WSL where FTS5 is included.')
0 commit comments