neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
Python·TypeScript·Java·.NET SDK와 HTTP·MCP 도구로 로컬 AI 의사결정 엔진을 실행하고 캐시 보존을 설정
Run a local AI decision engine with Python, TypeScript, Java and .NET SDKs, HTTP and MCP tools, and configurable decision cache retention.
개발 도구Python · JavaGitHub @tgundhus온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Laya-Pro is a local decision engine with typed choices, scores and yes/no decisions, retention-aware caching, local MCP tools and Python, TypeScript, Java and .NET integrations.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Laya-Pro is a local AI decision engine for classification, scoring and yes/no questions.
Use it for ticket routing, moderation, guardrails and structured decisions in your own applications.
It runs on your hardware through Python or ONNX Runtime, with HTTP and local MCP interfaces.
Built on Laya, this fork adds configurable decision
retention, replay across devices and precision modes, and optimizations around inference.
The pretrained models remain upstream Laya checkpoints; the fork maintains its own code,
SDKs, documentation and measurements.README 전문 보기 ↗Laya-Pro is a local AI decision engine for classification, scoring and yes/no questions. Use it for ticket routing, moderation, guardrails and structured decisions in your own applications. It runs on your hardware through Python or ONNX Runtime, with HTTP and local MCP interfaces.
Built on Laya, this fork adds configurable decision retention, replay across devices and precision modes, and optimizations around inference. The pretrained models remain upstream Laya checkpoints; the fork maintains its own code, SDKs, documentation and measurements.
Selected upstream changes are reviewed through Laya 0.4.6. The 12 October review records the adopted fixes, measured costs and deferred features.
Documentation · Integration · Benchmarks · Deployment
python -m pip install "laya-pro @ git+https://github.com/tgundhus/laya-pro.git"
# HTTP and MCP support
python -m pip install "laya-pro[serve,mcp] @ git+https://github.com/tgundhus/laya-pro.git"
Python 3.10–3.13. The distribution is laya-pro; imports and commands remain laya.
Install it separately from upstream laya, since both provide that import.
Source installation is supported until a Laya-Pro registry release is published.
For reproducible deployment, append a reviewed commit SHA to the Git URL.
The first model load downloads a checkpoint. Inference runs locally. For offline use, download checkpoints beforehand and pass their directories to the Router. Installation and platform notes.
from laya import DecisionCache, Router, decision_margins
questions = {
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {"billing": "invoices, payments and refunds",
"technical": "bugs, outages and access problems",
"other": "other requests"},
},
"urgent": {"type": "noul", "instructions": "Does this need attention today?"},
}
with DecisionCache("decisions.sqlite", ttl=7 * 86400, maxsize=100_000) as cache:
with Router(hooks=[cache]) as router:
state = "We were billed twice. Please refund the duplicate today."
result = router.predict(state, questions)
print(result["answers"]["department"]["choice"])
print(decision_margins(result))
router.predict(state, questions) # an exact repeat replays the stored decision
| Question | Returns |
|---|---|
choice | Label, probabilities per option and confidence |
score | Expected level on an ordered rubric and its distribution |
noul | Probability of yes |
Questions in a request share a forward pass. predict_batch handles multiple states;
predict_long handles documents beyond the context window. Routing selects an English,
multilingual or task-specific checkpoint. Explicit model and lang overrides are available.
The cache stores request hashes and result payloads, including option labels and probabilities. It does not store the original request text. Expiry prevents replay; physical deletion requires pruning and a policy for database files, journals and backups. A cached answer can still be wrong. Cache behavior and retention.
| Application | Interface |
|---|---|
| Python, in process | Router, Agent, ONNXAgent, typed schemas and prediction hooks |
| JavaScript / TypeScript, HTTP | HTTP client for your own laya-serve |
| JavaScript / TypeScript, in process | ONNX SDK |
| Java, in process | Java SDK |
| .NET, in process | .NET SDK |
| Editor or agent tools | MCP over stdio, local inference or your own HTTP server |
| Agent frameworks | LangChain / LangGraph, LlamaIndex, CrewAI |
The SDKs have different capabilities. Pro's persistent decision cache runs in the Python engine; HTTP clients and MCP can use that engine's cache. Native SDKs do not implement the same persistence policy. Capability table and examples.
Start a local HTTP server with laya-serve, then call POST /v1/systemone or
POST /v1/systemone/batch. Set these variables in the server's environment for a seven-day cache:
LAYA_CACHE_PATH=decisions.sqlite
LAYA_CACHE_TTL=604800
LAYA_CACHE_MAXSIZE=100000
The same cache variables apply to laya-mcp-server. Authentication, request bounds,
concurrency and offline setup are covered in the deployment guide.
The October CPU check used a pinned English checkpoint, fp32 and four threads. Median single inference was 571.5 ms; a SQLite repeat was 0.148 ms. All 12 answers agreed between serial and grouped batch execution. Workstation load was uncontrolled and this small check does not measure accuracy. Current results and methods.
These archived results used published checkpoints on an Apple M4 Max in September 2026, against Laya 0.3.20/0.3.21. They describe those runs, not a guarantee for newer versions or another machine. Method and raw results.
| Workload | Upstream run | Laya-Pro run |
|---|---|---|
| Repeated three-question ticket, CPU | 143.9 ms | 0.037 ms, memory cache |
| Repeated three-question ticket, MPS | 34.1 ms | 0.058 ms, memory cache |
| Stream with 70% repeats, MPS | 16.8 requests/s | 61.0 requests/s |
| 16 identical new requests, CPU | 16 forward passes, 1.26 s | 1 forward pass, 0.22 s |
| Shared-model new request, CPU | 152.7 ms | 151.8 ms |
| Cached decisions replayed after SQLite restart | — | 20,000 of 20,000 |
New requests are dominated by inference; cache speed depends on repeat frequency. Earlier parity checks covered 841 requests in 11 languages. Precision changes can change decisions, so validate fp16, bf16 or int8 on your own data before adopting them. The October review records current checks, fixes, measurements and verification limits separately from these archived results.
This version incorporates upstream 0.3.29 and selected correctness and integration changes reviewed through 0.4.2. The distribution remains 0.3.29 and retains Laya-Pro's English fallback for ambiguous Latin text. This is selected upstream coverage, not complete behavioral parity; the 10 October review records adopted changes, measurements and limits.
Validate accuracy and confidence on representative labelled data. Large choice sets, underspecified criteria and ordinal scores remain difficult. Replay improves repeatability, not accuracy; an expired, evicted or unavailable entry is computed again. See measured limits and the evaluation harness.
Contributing covers test suites, required lint and compile gates, and strict documentation builds. Changes should include a runnable regression check and measured evidence when they alter performance or numerical behavior.
Laya was created by Nandakishor M and developed by Convai Innovations. Laya-Pro's additions are maintained by Tobias Gundhus. The engine, checkpoints and fork are licensed under Apache 2.0. Laya-Pro is an independent fork, with no endorsement implied.