Repository navigation
Releases
OpenDecisons: Image installation
OpenDecisions Image Modality
OpenDecisions Image Modality
STROT: Updated token weights
- Threads to both tiers' tokenization (head's embedder + deep's LoRA config).
- Baked into the artifact → inference uses the exact window it trained on.
- Busts the cache when changed (a different window is a different model).
- head and deep always share the value from one default, so they can never silently diverge again — the whole point of the last two fixes.
Fix: `deep` now LoRA-adapts the same frozen encoder as `head`
2.0.1
Fix: deep now LoRA-adapts the same frozen encoder as head (was a different,
weaker base — ModernBERT-base vs gte-modernbert-base), so it's a true superset.
Forced float32 + trust_remote_code on the finetune/runtime loads. Verified on CPU.
## STROT 2.0.0 — OpenDecisions
- MCP-first:
python -m strot.mcpships in the core install; tools take labels. - Agent skill:
strot initinstalls a playbook + compile script for your agent. - Watcher:
strot.ingest_traces+strot.infer_questionslearn a $0 local
understudy from an agent's traces (plain dicts or OpenTelemetry spans) — the
decisions are the labels. SeeWATCHER.md.
STROT v1.1.0 — MCP agent surface + lifecycle primitives
1.0.0 was the compiler, converged to one door: decide → a self-contained .strot model that decides locally at $0. 1.1.0 keeps that core untouched and adds the surface for an agent to drive and maintain compiled models — plus the signals a maintainer runs on.
MCP — drive the compiler from an agent
- New strot-ai[mcp] extra exposes the compiler as an MCP server (python -m strot.mcp, SDK 2.x).
- 17 tools covering the full lifecycle: inspect_data, pii_scan, design_questions, compile_start/compile_status (async — a compile runs minutes), decide, evaluate_model, score, read_traces, drift_check, cluster_rejections, recompile, set_status/model_status (circuit breaker), budget_status, list_models, model_info.
- A strot_compiler playbook prompt teaches the methodology: inspect → pii → design → compile → verify → deploy → monitor → recompile → gatekeep.
- Guardrails: async-compile budget (STROT_MCP_COMPILE_BUDGET) and decide honors a paused model. The server does no LLM work of its own — all AI comes from the calling agent.
Lifecycle primitives (torch-free to read)
- strot.evaluate / score_decisions — accuracy, coverage, calibration (ECE) per question.
- strot.read_traces / summarize_traces — volume, refusal rate, confidence, value mix.
- strot.drift_check — recent-vs-baseline drift + a recommend_recompile verdict.
- strot.cluster_rejections — cluster refused records to surface the gap to close.
- strot.inspect_data / strot.pii_scan — profile raw input and preview what the teacher-boundary masker redacts.
- model.trace(path) — opt-in logging of every decision.
API
- model.dispatch("name") is the ship verb — writes one self-contained name.strot. (save() kept as a back-compat alias.)
Docs
- Full DEVELOPERS.md rewrite for 1.1; README gains an MCP section + Claude Desktop config.
Compatibility: additive. The decide API, the .strot artifact, and 1.0 models are unchanged. 141 tests green.
STROT 1.0.0 — a decision compiler
STROT 1.0.0 is a ground-up repurpose into a decision compiler: give it your real data and a one-line intent, get a specialized decision model that runs locally on CPU at $0.
questions = strot.questions(data, "triage support tickets") # LLM designs the schema
model = strot.decide(data, questions) # distill a model on your data
model(record) # decide locally, typed JSON
model.save("triage"); strot.load_model("triage") # ship + reuse
Breaking
strot.run()and the routing / action-registry API are removed — the single entry point is nowstrot.decide().- The
Battery/ hub-distribution API (strot.load,export_bundle, …) and the Julia runtime are gone. Models save/load as one self-contained.strotfile viamodel.save()/strot.load_model().
Highlights
- Specialized decision models — a calibrated head per typed question (
predicate/choice/score) on a frozengte-modernbertencoder, distilled from LLM-teacher labels on your real data. - Three tiers —
lite(zero-shot, $0, bring no data),head(distilled, default),deep(shared LoRA adapter). - warm-start (
warm=True) —liteserves instantly whileheadtrains in the background, then hot-swaps in. - Calibrated confidence and an OOD / drift gate that refuses records unlike anything in training.
Install
pip install "strot-ai[local,anthropic]"
Status
Benchmark-validated on Banking77 (93% full-data, 87% @10/class). The decide API is stable; validation breadth is still growing — bring your own data.
0.12.0
What's new in 0.12.0
Opt-in compile-time fine-tune tier (JIT Tuning). When optimize=True and an accuracy or risk target is set, and the frozen tier misses it on the real measure fold, the compiler fine-tunes once at compile time — cached-lower + top-N LoRA on ModernBERT, with a small diverse-adapter ensemble averaged at inference. It never retrains at runtime and never loops; without a target optimize=True is a no-op and the frozen battery ships. reuse_adapter= adopts a prebuilt adapter and skips training. Needs the [finetune] extra.
Dispatch by default; abstention is opt-in. With no target set, the runtime dispatches every record with a calibrated confidence and never hard-abstains. Set target_risk (split conformal) or target_accuracy (empirical dispatch cutoff) to abstain below the bar; abstained records come back in result.fallbacks.
PII masking at the teacher boundary. Records are masked before the compile-time LLM teacher sees them. GLiNER is the default masker for names, addresses, and orgs (via the [pii] extra), with a regex pre-pass for format-defined tokens. Without [pii] it falls back to regex-only with a warning. Compile-time only; the runtime stays mask-free.
Batteries. The compiled artifact is now written as battery_<task>_<hash>.py, the slug from a new name= on run()/decide() or derived from the query.
Battery distribution. Export a battery as a data bundle (battery.json + weights.safetensors) with export_bundle(), and load it back with load(). load(), list_batteries(), and battery_info() resolve a bare name from a Hugging Face dataset repo (default strot-ai/batteries, overridable via repo= / STROT_BATTERY_REPO) or a local path.
CI now tests on Python 3.9, 3.15, and 3.15t.
v0.11.1 - Remove LLM-escalation cascade
Removes the LLM-escalation cascade (escalate_to) added in v0.11.0.
Measured on tweet_eval hate, tier-2 escalation to haiku bought ~0 accuracy (64.1% vs the local model's 63.5%) at real per-record cost and a runtime LLM dependency - against STROT's principle that the runtime stays frozen, local, and free. A cascade only pays when tier-2 substantially beats tier-1, and that is a model-slot decision (a specialist or bigger model in nlu=), not a runtime feature.
What stays: target_accuracy as a LOCAL-only policy - temperature + per-class-bias corrections and a dispatch cutoff fitted at compile and baked in, no LLM at runtime. Below-cutoff records abstain; the consumer decides what happens next. This is the Jev-style contract: return the decision with its honest (calibrated) confidence and let the caller threshold - don't pay to act clever on the hard slice.
The cascade benchmark finding is kept in benchmarks/ as the record of why it was removed. 106 tests pass.
v0.11.0 - Target-accuracy policy + inference corrections + cascade
Keep optimizing until a target is met, cheaply - with inference-level corrections and a two-tier cascade, all fitted at compile, runtime frozen.
New
- target_accuracy=0.8: fit temperature + per-class bias corrections and a dispatch cutoff on held-out folds so auto-decided records meet the target; below-cutoff records abstain. Mutually exclusive with target_risk. An empirical policy, NOT a finite-sample guarantee - and it optimizes ACCURACY (see caveat below).
- escalate_to="anthropic/claude-haiku-4-5" (or openai/...): two-tier cascade. Abstaining records are arbitrated by a stronger model at runtime, bounded to registry keys (else human fallback). Only the escalated slice pays per-record cost.
- Per-class vector-scaling bias correction (corrects systematic class skew a single temperature cannot).
Validated live on tweet_eval hate - two findings worth more than the number
Full stack (distilled + target 0.8 + haiku escalation) scored 63.7% combined on 400 tweets - and taught two lessons, documented with the data in benchmarks/:
- A cascade only pays when tier-2 substantially beats tier-1. Haiku (64.1%) essentially tied the distilled local model (63.5%) on implicit hate, so escalating 145 tweets bought ~0 accuracy at real cost. Use the cascade when the escalation arbiter genuinely dominates (Opus, a task specialist) - not when both tiers are weak on the same hard cases.
- Accuracy-target correction trades minority recall for accuracy on imbalanced data. The fitted class bias shifted toward the majority class and hate recall collapsed to 22%. That is accuracy-optimization doing exactly what it was told - and accuracy is the wrong objective for moderation. Optimize recall/F-beta on the positive class there (a clean future lever).
The machinery is correct and cheap; it shines when tier-2 dominates and classes are balanced. On adversarial imbalanced hate detection it does not rescue the task - the bottleneck remains a decision model that can read implicit hate, which is a model-slot problem (task-trained specialist), not a policy problem.
108 tests pass.