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
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,6 +239,59 @@ Generation runs locally: free, offline, no API key. Unlike the CLI and API backe
239
239
240
240
The large default context can exceed memory for big models on constrained hardware (Ollama returns a 500). Lower `OLLAMA_NUM_CTX` or pick a smaller model if generation fails to load.
241
241
242
+
### Embedding Model
243
+
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
+
246
+
| Model | Dimensions | Notes |
247
+
|-------|-----------:|-------|
248
+
|`bge-small-en-v1.5`| 384 | Default. Fastest to index, smallest download. |
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:
253
+
254
+
```bash
255
+
export SKILLD_EMBED_MODEL=bge-m3
256
+
skilld update --force
257
+
```
258
+
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:
260
+
261
+
```bash
262
+
skilld update --force
263
+
```
264
+
265
+
### Embedding Device
266
+
267
+
The embedding model runs on the CPU by default. **Embedding device** in `skilld config` moves it onto a GPU backend, which can be substantially faster:
268
+
269
+
| Device | Notes |
270
+
|--------|-------|
271
+
|`auto`| Default. Lets transformers.js choose, CPU under Node. |
272
+
|`cpu`| Always available, predictable. |
273
+
|`webgpu`| Fastest on Apple Silicon in testing. |
274
+
|`coreml`| Apple Neural Engine. Measured slower than CPU for these models. |
275
+
276
+
Measured on an Apple M5 Max, 120 documents, best of 3 after warm-up (docs/sec):
277
+
278
+
| Model |`cpu`|`coreml`|`webgpu`|
279
+
|-------|------:|---------:|---------:|
280
+
|`bge-small-en-v1.5`| 664 | 198 |**1713**|
281
+
|`bge-base-en-v1.5`| 198 | 68 |**580**|
282
+
|`Xenova/bge-large-en-v1.5`| 71 | 9 |**201**|
283
+
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.
285
+
286
+
The ranking is hardware-specific, so benchmark before trusting a device on other machines. Set `SKILLD_EMBED_DEVICE` to override the saved setting:
287
+
288
+
```bash
289
+
export SKILLD_EMBED_DEVICE=cpu
290
+
skilld update --force
291
+
```
292
+
293
+
If a backend is unavailable, indexing fails to start. Switch back to `auto`.
294
+
242
295
### Eject
243
296
244
297
Export a skill as a portable, self-contained directory for sharing via git repos:
0 commit comments