Kairos Family - Decision Models
Collection
All Kairos models from 2.x lineage. โข 6 items โข Updated
How to use Walkowicz/kairos-pi-2.0-low with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Walkowicz/kairos-pi-2.0-low") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Walkowicz/kairos-pi-2.0-low", device_map="auto")
pi-2.0-low)
Bilingual (EN + PT-BR) non-autoregressive System-1 decision encoder fine-tuned from dmis-lab/UltraBERT-150M across a 4-stage zero-distillation curriculum. Delivers calibrated multi-choice routing (up to 255 options in one pass), binary noul verification, continuous scoring, and 100.0% abstention recall at 93.68 ms CPU p50 in selective INT8 ONNX (223.00 MB).
84.87% ยท PT-BR 82.74%33/33 Twins ยท 100% Order Inv.72.14 ยท Unseen SciQ 46.67223.0 MB INT8 ยท GPU 42.74 ms| File | Format | Exact Size | Role |
|---|---|---|---|
model.safetensors |
PyTorch FP32 | 584.10 MB (612,470,532 B) |
Calibrated native PyTorch weights (84.36% forced / 83.44% safe, 0.0467 Score MAE) |
onnx/kairos_pi2_low.onnx |
ONNX FP32 | 580.10 MB (608,282,747 B) |
Full-precision ONNX Runtime graph (3e-06 max prob diff vs PyTorch CPU, 120.16 ms p50) |
onnx/kairos_pi2_low_int8.onnx |
ONNX Selective INT8 | 223.00 MB (233,836,733 B) |
Recommended CPU runtime (-61.56% size). 132/222 quantized nodes (84.87% forced, 93.68 ms p50) |
kairos_pi2_low_config.json |
Config JSON | 715 B |
Architecture specs, NLL temperatures (T_choice=2.5584, T_noul=3.8195), and abstention thresholds |
modeling_pi2_low.py, config.py |
Python | 21,799 B |
Standalone model loader, calibrated heads, ActiveAbstentionGate, and to_decision_output() |
tokenizer.json, tokenizer_config.json |
Tokenizer | 3.36 MB |
dmis-lab/UltraBERT-150M native tokenizer (`< |
1,200 Cases โ Forced Accuracy)
PI2LowDecisionIndexEngine (5-task public probe: 12.70 โ 30.12 skill; 4 zero-exposure unseen families: 16.79 skill)| Runtime / Benchmark Config | Forced Acc | Forced F1 | Safe Acc | Abstain Recall (114) |
False Abstain | Forced ECE | Twins (33) |
Order Inv. | Score MAE | Latency p50 |
|---|---|---|---|---|---|---|---|---|---|---|
ONNX Selective INT8 (223.0 MB) |
84.87% | 89.67% | 83.84% | 100.0% | 1.53% | 0.0385 | 100.0% | โ | โ | 93.68 ms (CPU) |
PyTorch BF16 (RTX 3060 GPU) |
84.36% | 89.08% | 83.44% | 100.0% | 1.64% | 0.0385 | 100.0% | 100.0% | 0.0467 | 42.74 ms (GPU) |
ONNX FP32 (580.1 MB) |
84.36% | 89.08% | 83.44% | 100.0% | 1.64% | 0.0385 | 100.0% | โ | โ | 120.16 ms (CPU) |
PyTorch FP32 (CPU) |
84.36% | 89.08% | 83.44% | 100.0% | 1.64% | 0.0385 | 100.0% | 100.0% | 0.0467 | 146.54 ms (CPU) |
Stage 3 (low_stage3) |
83.84% | 88.56% | 82.82% | 100.0% | 1.43% | 0.0412 | 100.0% | 100.0% | 0.0536 | 43.43 ms (GPU) |
| UltraBERT-150M (Untrained Heads) | 52.04% | 19.33% | 0.00% | 100.0% | 100.0% | 0.1825 | 0.0% | โ | โ | 45.11 ms (GPU) |
PI 1.0 Low (ModernBERT-base) |
41.51% | 27.17% | 4.09% | 97.37% | 93.35% | 0.0174 | 0.0% | โ | โ | 30.15 ms (GPU) |
Complete audit tables, failure diagnostics, and ablation analysis: BENCHMARK.md.
KairosPI2LowForDecision.decide() + to_decision_output())from transformers import AutoTokenizer
from modeling_pi2_low import KairosPI2LowForDecision
model_dir = "./release_card"
tok = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = KairosPI2LowForDecision.from_pretrained(model_dir).eval()
bos = tok.bos_token or "<|endoftext|>"
eos = tok.eos_token or bos
sep = tok.sep_token or "<|sep|>"
mask = tok.mask_token or "<|mask|>"
options = {
"nominal": "Normal pump vibration and bearing temperature",
"warning": "Elevated RMS vibration requiring preventive inspection",
"critical": "Immediate shutdown required due to severe fault signature",
}
opt_keys = list(options.keys())
opts_str = " ".join(f"{mask} {k}: {options[k]}" for k in opt_keys)
state_json = '{"sensor_vib_mm_s": 11.4, "bearing_temp_c": 91.8, "alarm_active": true}'
prompt = f"{bos} [TASK:CHOICE] Classify asset operating state. {sep} {opts_str} {sep} {state_json} {eos}"
enc = tok(prompt, truncation=True, max_length=2048, return_tensors="pt")
mpos = (enc["input_ids"][0] == tok.mask_token_id).nonzero(as_tuple=True)[0]
decision = model.decide(
enc["input_ids"],
enc["attention_mask"],
mask_positions=mpos,
task="choice",
candidate_names=opt_keys,
mode="safe",
)
print(decision.to_decision_output())
kairos_pi2_low_int8.onnx, 223 MB ยท 93.68 ms p50)import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("./release_card", trust_remote_code=True)
sess = ort.InferenceSession("./release_card/onnx/kairos_pi2_low_int8.onnx", providers=["CPUExecutionProvider"])
prompt = "<|endoftext|> [TASK:CHOICE] Pick status. <|sep|> <|mask|> ok: Nominal <|mask|> alert: Fault <|sep|> {\"temp_c\": 92.0} <|endoftext|>"
enc = tok(prompt, truncation=True, max_length=2048, return_tensors="np")
mpos = np.where(enc["input_ids"][0] == tok.mask_token_id)[0].astype(np.int64)
choice_logits, abstain_logit = sess.run(
None,
{
"input_ids": enc["input_ids"].astype(np.int64),
"attention_mask": enc["attention_mask"].astype(np.int64),
"mask_positions": mpos,
},
)
For binary
task="noul"(<|mask|> no <|mask|> yes), passmpos = mask_positions[:2]and rescale(choice_logits * 2.5584)before dividing(l_yes - l_no)byT_noul = 3.8195.
978 Classification Rows across 6 Operational Domains)| Operational Domain | Stage 1 | Stage 3 | Stage 4 Final | Correct / Total |
|---|---|---|---|---|
reliability_adversarial_twin | 100.0% | 100.0% | 100.0% | 66 / 66 |
equipment_sensor_analytics | 97.12% | 97.12% | 97.12% | 202 / 208 |
intent_business_triage | 91.67% | 90.83% | 90.42% | 217 / 240 |
structured_numerical_tabular | 85.61% | 86.36% | 86.36% | 114 / 132 |
robotics_propulsion_timeseries | 60.87% | 66.30% | 70.65% (+9.78) | 65 / 92 |
grounded_verification | 58.75% | 66.25% | 67.08% (+8.33) | 161 / 240 |
dmis-lab/UltraBERT-150M and audited permissive open-source datasets with zero synthetic distillation and zero evaluation leakage. See DATASET_CARD.md.
Base model
dmis-lab/UltraBERT-150M