Skip to content

Speed up recall

Recall reranks its best candidates with a small local cross-encoder model. By default, the compiled Signet binary runs that model and the built-in embedding model on WebAssembly. That works everywhere but is slow on a busy machine. signet accelerate installs a native ONNX runtime, and optionally GPU support, and points Signet at it.

Terminal window
signet accelerate

This prints the detected GPU, the installed runtime files, and the runtimes configured in your workspace. It reads the configuration, not the running daemon, so after a change it shows the new settings before you restart, and it can’t tell you whether the daemon fell back. Use signet accelerate verify for that. signet accelerate status does the same as signet accelerate; add --json for machine-readable output.

Command Runs Installs
signet accelerate cpu Embeddings and the cross-encoder on the native CPU runtime The native ONNX runtime for your platform, a few tens of MB, checked against pinned hashes
signet accelerate cuda The cross-encoder on an NVIDIA GPU; embeddings on the native CPU runtime The native runtime plus the ONNX Runtime CUDA provider and the CUDA 12 and cuDNN 9 libraries it needs, about 2.9 GB, fetched from NuGet and PyPI and checked against pinned hashes. Linux x64 with NVIDIA driver 525 or newer.
signet accelerate metal The cross-encoder on an Apple silicon GPU; embeddings on the native CPU runtime Only the native runtime; its macOS build includes the Metal provider
signet accelerate off The cross-encoder and the built-in embedding model on WebAssembly again Nothing

Only the built-in local embedding model moves to the native runtime. If you use Ollama, OpenAI, llama.cpp, or another embedding provider, accelerate leaves it alone and says so.

Terminal window
signet accelerate cpu
signet restart
signet accelerate verify

verify runs a recall against the running daemon and waits up to --timeout seconds (default 120, minimum 5) for the cross-encoder to answer on the configured device. It searches for signet accelerate verification, so it needs at least one memory that matches that text, for example one saved with signet remember "signet accelerate verification test". When recall comes back empty, it reports “not verified” and exits with status 1: the runtime wasn’t checked, not proven broken. Save a memory and try again.

If the native, CUDA, or Metal worker can’t start, recall falls back to the default runtime and the daemon log says why.

Native embeddings produce slightly different vectors from WebAssembly, so switching the embedding runtime re-embeds your stored memories in the background. Recall keeps using the current vectors until the new index is ready.

Downloaded runtimes live in runtime/accelerators inside your workspace. The command edits agent.yaml for you. It keeps comments, unrelated keys, file permissions, and symlinks, and saves the previous contents as agent.yaml.bak beside the real file (after following symlinks). If two edits race, one fails instead of overwriting the other. An interrupted edit can leave a .lock file; make sure no other config edit is running before you delete it and retry.

Paths you set by hand outside the managed runtime/accelerators directory are kept when you turn acceleration on or off.

These are the keys accelerate writes:

embedding:
runtime: onnxruntime
onnxRuntimePath: /path/to/onnxruntime-node
memory:
pipelineV2:
reranker:
device: cuda # default, cpu, cuda, or metal
onnxRuntimePath: /path/to/onnxruntime-node
cudaLibraryPaths:
- /path/to/cuda12/lib
  • onnxRuntimePath is an onnxruntime-node package directory at the version your Signet build expects; the compiled binary refuses another version. For device: cuda it must include the CUDA provider.
  • cudaLibraryPaths lists directories of CUDA 12 shared libraries to load before the CUDA provider, so you don’t need a system CUDA install or LD_LIBRARY_PATH.

The reranker lives under memory.pipelineV2.reranker:

Key Default Range Meaning
crossEncoderModel mixedbread-ai/mxbai-rerank-xsmall-v1 Model downloaded on first use. Set "" to skip the cross-encoder and rank by embeddings only.
topN 20 1–100 How many top candidates the reranker reads
timeoutMs 2000 100–30000 Deadline for one rerank
device default default, cpu, cuda, metal Where the cross-encoder runs
useExtractionModel false Rerank with your configured LLM instead. Errors from this reranker fail the recall.

The model loads in the background the first time recall needs it. While it is loading, busy, or slower than three quarters of timeoutMs, recall ranks that request by embeddings instead. When recall reranks, its response includes meta.reranker with the reranker that ran (cross-encoder, embedding, llm, or none), the device for a successful cross-encoder run, and the reason for any fallback.

See Memory and recall for how reranking fits into recall.