Instructions to use star-ga/mind-nerve with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use star-ga/mind-nerve with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("star-ga/mind-nerve") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
mind-nerve β Intent-classification preselector for agent runtimes
Open the library, hide the cost. A small, fast classifier sits between a user request and the host runtime (Claude Code, codex, grok, kimi, gemini, MCP hosts β 17 CLI runtimes supported by the installer). It reads the request, decides which subset of available skills/tools/agents/MCPs is relevant, and hands the host a short list β so the downstream LLM never sees the full library in its system prompt.
Result: library size decouples from token cost. A 1,300+ skill hub is reachable for ~2k tokens of announce instead of a ~95k-token bulk listing β and only the top-K bodies are ever loaded per turn.
Current release: v0.3.0b8+ (public beta). PyPI:
mind-nerve Β· Code:
github.com/star-ga/mind-nerve.
What's new in the beta line
- Per-prompt routing hook β a
UserPromptSubmithook queries the routing daemon per prompt, projects the relevant skills into the CLI's skills dir (atomic symlink flip), and injects a ranked route table with absoluteSKILL.mdpaths. This is what makes a large hub reachable without being announced. mind-nerve acquireβ vetted external acquisition: search curated sources (Anthropic's skills repo, the official MCP servers repo, the MCP registry API, GitHub search), fetch into a capped quarantine, run a deterministic fail-closed static security scan (shell-pipe installers, reverse shells, exfiltration collectors, prompt injection incl. MCP tool schemas, archive escapes, credential access, persistence hooks), and install the clean packages into the hub with per-file SHA-256 manifests and a live daemon reindex. Threat model:docs/acquisition.mdin the repo.- Native Q16.16 encoder bundled β the wheel ships
libmind_nerve_encoder.sowith a realencoder_weights.q16.binblob;MIND_NERVE_BACKEND=nativeis the default routing path with a PyTorch fallback. - Cross-CLI audited β the change set was independently audited by two external CLI agents; all critical/high findings fixed with regression tests.
Usage
pip install mind-nerve
from mind_nerve import route
result = route("git status", top_k=5)
for r in result.routes:
print(r.score, r.name, r.kind)
The first call auto-downloads this checkpoint into
~/.local/share/mind-nerve/runtime/. To pre-seed or use a custom location,
set MIND_NERVE_RUNTIME_DIR=/path/to/your/runtime/.
Wire the per-prompt hook into your CLIs (claude-code, codex, grok, kimi, gemini, +12 more):
mind-nerve-install install --cli all
Acquire a vetted external skill:
mind-nerve acquire search "pdf"
mind-nerve acquire install <url>
Model
- Base model:
BAAI/bge-small-en-v1.5(fine-tuned) - Loss: MultipleNegativesRankingLoss
- Training: 3 epochs, batch 32, lr 2e-5, max_len 256, seed 1337
- Hardware: single CUDA GPU, 119.5 s wall-clock
- Training date: 2026-05-16T04:00:53Z
Catalog
- Version:
v1.1-oss(public-clean β no STARGA-private content in the training corpus) - Candidate pool: 11,922 routing candidates (skills + tools + agents)
- Corpus hash:
1cd130fa98255241b93aaa2fe6a8086bcbf6fc0627c904008cf48ba9f233536d - Tokenizer hash:
cc2a5502d0fa683c98d59da77af1e4ef3a3812e7e2f345c1d8d7a90bed99d817 - Model hash:
83d4d390469bc1bc6a6cac3b9ab8448dcfcd9ac2ba1ab9fce9348c64012681a6
Metrics (held-out eval, 1,193 pairs)
| Baseline (BGE off-the-shelf) | After Phase 1 fine-tune | Ξ | |
|---|---|---|---|
| Top-1 | 0.7527 | 0.8449 | +0.092 |
| Top-5 | 0.9296 | 0.9606 | +0.031 |
| Top-10 | 0.9489 | 0.9707 | +0.022 |
What's in this repo
checkpoint/β sentence-transformers checkpoint (model.safetensors + tokenizer + config)manifest.jsonβ full provenance (corpus_hash, model_hash, training config, metrics)route_table.npyβ precomputed catalog embeddings (11,922 Γ 384, float32)route_table.jsonlβ catalog metadata (one JSON object per row ofroute_table.npy)
Status & roadmap
Public beta (v0.3.0b8+). The PyTorch reference path above drives the catalog; the bundled native Q16.16 encoder is the default routing path. The active workstream is the pure-MIND migration: the repo's end state is MIND-only (router core, CLI, daemon, MCP server, hook, installer as a compiled native binary), tracked in ROADMAP.md. mindc is at 0.10.2; the kernel tree compiles under a fail-closed CI gate. Cross-arch bit-identity for CUDA (task #57) remains open β the emit path, not the hardware, is the blocker.
License
This model card and the weights it points at are released under Apache-2.0.
The PyPI wheel mind-nerve bundles a FORTRESS-protected libmindnerve.so whose source remains private (STARGA Commercial). The wheel is Apache-2.0; the bundled binary is the protected runtime layer. The Phase 1 inference path published here does not depend on the protected binary.
For commercial deployments needing per-customer FORTRESS-locked builds of the runtime layer, contact license@star.ga.
Citation
@software{mind_nerve_2026,
author = {STARGA, Inc.},
title = {mind-nerve: Intent-classification preselector for agent runtimes},
year = {2026},
url = {https://github.com/star-ga/mind-nerve},
version = {0.3.0b9},
}
Model tree for star-ga/mind-nerve
Base model
BAAI/bge-small-en-v1.5