lmsearch
lmsearch is a native C++ vector and neural search CLI and lmcode host unifying ONNX embeddings, AutoFaiss index tuning, and FAISS search.
Quick reference
lmscript install github:lmctl-ai/lmsearch@v0.1.16
lmsearch --version
lmsearch --lmcode-schema --json
lmsearch --lmcode-signatures
lmsearch index README.md examples --output build/docs.faiss --model all-MiniLM-L6-v2
lmsearch search --index build/docs.faiss --query "ONNX and FAISS vector search" -k 3
| Item | Kind | Purpose |
|---|---|---|
| index / search | CLI subcommands | Embed and index files with ONNX into FAISS and search with metadata filters. |
| serve / client | CLI subcommands | Single-user lazy in-memory REST server with broad-query cache and fast requery views. |
| onnx_embedder / onnx_pretrained / OnnxModel | ONNX layer | Build, validate, cache, and execute ONNX embedding graphs. |
| autotuner / AutoPlan / IndexMetrics | AutoFaiss layer | Select memory-bounded FAISS index keys and autotune query hyperparameters. |
| faiss_index / auto_index / FaissIndex | FAISS layer | Index vectors or documents, run filtered KNN or range search, and evaluate recall. |
| VectorFilter, Reranker, FileFilter, IgnoreRule, IndexPolicy | SAM interfaces | Customize file pruning, ingestion, AutoFaiss selection, ID filtering, and reranking. |
program = _lmcode_ cli="lmsearch" install="github:lmctl-ai/lmsearch@v0.1.16";
let model = onnx_embedder(128, 32, 16).pooling(Pooling.MEAN).normalize(true);
let plan = autotuner(1000, 16).metric(Metric.COSINE).max_memory("16MB").plan();
let idx = auto_index(plan).embedder(model);
idx.add_doc(document(1, "ONNX and FAISS vector search"));
idx.search_text("vector search", 1).emit("hits");
end _lmcode_
r = run_lmcode(program);
assert(r.ok);