Tamkimd/tamev-micro-minilm
⚡ TAMEV-Micro-MiniLM
A micro-tier System One decision model: give it a state plus typed questions and it returns calibrated `choice` / `noul` / `score` answers in one forward pass — no text generation, no JSON repair.
Open-source, Apache-2.0, self-hostable, and a drop-in protocol alternative to hosted decision APIs such as TypeSafe Jev. Related projects: Jared Palmer's Kev, Laya, and SemIf.
![Permutation drift]() ![Latency]() ![Parameters]() 
💡 What is TAMEV-Micro-MiniLM?
A general-purpose LLM answers a routing or triage question by generating text that your application then parses. TAMEV-Micro-MiniLM answers it by scoring a candidate list:
- ⚡ 8.12 ms p50 / 98.3 req/s measured on Commodity CPU (single thread).
- 🎯 Typed answers:
choice(pick one of K options),noul(probability of a yes/no question), andscore(expected value over an ordinal rubric) in one call. - ⚖️ Order-independent scoring: context and options are encoded separately and compared with a symmetric bilinear head, $\text{Score}(c, oi) = (Wq c)^T (Wk oi) / \sqrt{d}$, so reordering options permutes the score vector rather than changing it. Measured drift: 1e-08 (float32 noise floor) with a 0.00% decision-flip rate.
- 🎯 Calibration you can inspect: temperature-scaled probabilities, ECE 0.0499 and Brier 0.4244 on the held-out suite.
- 💰 Zero marginal cost: run it locally or in-process; no cloud round-trip and no per-token fee.
This tier is self-contained: the backbone and pointer head are already fused in model.safetensors.📊 Model Overview
🏆 Evaluation
Source: runs/benchmarks/all_models_report.json in the TAMEV repository, evaluated on the held-out decision suite (data/processed/test.jsonl, 896 samples) built from the public datasets listed in the front matter.
These are the numbers from one measured run, not guarantees. Medium and Large tiers in the family were evaluated with at most 4 options per question while the encoder tiers used up to 8, so cross-tier accuracy is indicative rather than like-for-like.
🔒 How the permutation guarantee works
- Separate encoding: the state and each candidate option are encoded independently; options never attend to each other.
- Symmetric head: the score uses the same bilinear form regardless of option position, so a permutation of inputs is a permutation of outputs.
- Dedicated option budget: each option gets its own token window (up to 64 tokens), and option encoding is chunked, so a 77-option question is scored as 77 options instead of being truncated.
📦 Artifacts in This Repository
ℹ️ Sizes are measured from the files in this repository (MiB). The ONNX INT8 artifact keeps embeddings and LayerNorms in FP32, so it is larger than the 21.7 MiB of quantized linear weights alone.
Download
huggingface-cli download Tamkimd/tamev-micro-minilm --local-dir ./tamev-micro-minilm🚀 Quick Start
Method 1: transformers with trust_remote_code=True
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "Tamkimd/tamev-micro-minilm"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
result = model.predict_decision( # `model.decide(...)` is an alias
state="My transaction on a Visa card was rejected while I was travelling in Tokyo.",
question="Which service queue should handle this incident?",
options=[
"verify_travel_unblock",
"file_fraud_dispute",
"replace_damaged_card",
"branch_appointment",
],
tokenizer=tokenizer,
)
print(f"Selected: {result['best_option']} (confidence {result['confidence']:.2%})")
print("Probabilities:", result["probabilities"])
print("Permutation drift:", result["drift_guarantee"])Requirements: torch>=2.4, transformers>=4.40, Python ≥ 3.10.
Method 2: in-process serving with the tamev package
The tamev package is not on PyPI yet; install it from the repository:
git clone https://github.com/tamkimd/tamev && cd tamev
uv venv && uv pip install -e ".[serve]"from tamev import Choice, Noul, Score, TypeSafeDirectClient
# The default engine auto-loads the Nano checkpoint on CPU.
# `model_name` is only a display label; pass `checkpoint_path=`/`backbone=` to change the weights.
with TypeSafeDirectClient(model_name="TAMEV-Micro-MiniLM") as client:
res = client.system_one(
state="Customer reports a debit card block during an overseas ATM withdrawal.",
questions={
"action": Choice(
instructions="Select the incident resolution playbook",
criteria={
"travel_unblock": "Verify identity and lift the travel restriction",
"dispute_charge": "Open an unauthorized-transaction fraud case",
"branch_visit": "Direct the customer to the nearest branch",
},
),
"is_emergency": Noul(instructions="Is the customer stranded and in urgent need of cash?"),
"urgency_score": Score(
instructions="Rate the incident urgency",
criteria=["Routine", "Elevated", "Critical"],
),
},
)
# Server-side `confidence` is the winning probability normalized against uniform
# chance for choice answers, (max(p) - 1/K) / (1 - 1/K); it is not a probability.
print("Decision:", res.answers["action"].choice)
print("Confidence:", res.answers["action"].confidence)
print("P(emergency):", res.answers["is_emergency"].noul)
print("Urgency score:", res.answers["urgency_score"].score)Method 3: HTTP server
uv run tamev serve --checkpoint Tamkimd/tamev-micro-minilm --port 8008 --device cpucurl -X POST http://127.0.0.1:8008/v1/systemone \
-H "Content-Type: application/json" \
-d '{"state": "Payment processor latency spiked to 4s", "questions": {"playbook": {"type": "choice", "instructions": "Pick a remediation", "criteria": {"throttle": "Throttle traffic", "scale": "Scale replicas", "restart": "Restart pods"}}}}}'🎯 Intended Use
- Agent workflow routing and tool-call gating: pick the next tool, subagent, or queue.
- Safety and policy triage: classify an input into your own labelled categories and thresholds.
- High-cardinality classification: intent catalogues such as Banking77-style 77-option menus.
- Batch and offline scoring: label or route records with no network dependency.
Not intended for: open-ended text generation, factual question answering, multilingual deployment without validation, or acting as an unaudited safety control. The model scores the options you give it; it does not know your policy.
⚠️ Limitations
- English-only training data. The suite is drawn from the datasets in the front matter, which are English (Banking77 excepted for its intent taxonomy). Other languages are unvalidated.
- Calibration is per tier and not uniformly ≤ 0.05. This tier measures ECE 0.0499, which is meets the repository's ≤ 0.05 target.
- Accuracy is suite-specific. A held-out suite of 896 items with mixed decision types is not a deployment estimate; validate on your own distribution.
- Artifacts other than the ones listed above (Core ML, GGUF, dynamic-INT8 PyTorch) are produced by the export pipeline but are not validated here.
- Tokenizer assets are the backbone tokenizer. Tokenization is identical to
sentence-transformers/all-MiniLM-L6-v2; no TAMEV-specific vocabulary or special tokens were added. - Latency is hardware-specific. 8.12 ms p50 was measured on Commodity CPU (single thread); your numbers will differ. No latency is claimed for Core ML, MLX, GGUF, or TorchScript artifacts in this repository.
- Permutation equivariance is an architectural property, while the drift value above is measured by the benchmark suite (1e-08 (float32 noise floor)); treat it as a measurement, not a contract.
- Protocol compatibility is not an endorsement. TypeSafe-compatible means the
/v1/systemonerequest/response shape, not TypeSafe's model or quality guarantees.
🥊 TAMEV Model Zoo
Medium/Large ship a pointer head and lazy-load the Qwen3.5 backbone; encoder tiers ship the full fused model. Accuracy across tiers comes from different option budgets (4 vs 8), so compare with care.
📄 License & Citation
Apache License 2.0.
@misc{tamev2026,
title={TAMEV: System One Decision Models for Edge AI, LLM Routing and Tool-Call Gating},
author={TAMEV Contributors},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/Tamkimd/tamev-micro-minilm}
}