--- license: apache-2.0 library_name: peft base_model: thinkingmachines/Inkling-2-Mini base_model_relation: adapter pipeline_tag: text-classification language: - en datasets: - nvidia/When2Call - nvidia/Aegis-AI-Content-Safety-Dataset-2.0 tags: - decision-model - classification - calibration - routing - guardrails - lora - peft - moe ---
# squid-1 `squid-1` is an open-weights, calibrated **System One decision model** post-trained as a rank-16 LoRA adapter on [`Inkling-2-Mini`](https://huggingface.co/thinkingmachines/Inkling-2-Mini) (26.4B total / 3.4B active looped-MoE) for **~$5.26 total training spend**. Given a state, a question, and candidate options, it returns calibrated probabilities over every valid option in a **single forward pass at `effort=0.0`**, without generating chain-of-thought tokens. - **72.77** weighted average across all 3 public-derived AA Decision Index v2.1 components (local proxy, 5,556 held-out items, 0 train–eval overlaps). - **Well-calibrated for escalation**: `0.0254` ECE and `0.834` error-detection AUROC on `decision-v7/test` — escalating the lowest-confidence 20% catches **52.6%** of all errors. - **Order- and injection-resilient**: `8.9%` 4-form flip rate (`0%` on safety) and a `>4×` smaller accuracy drop under unseen prompt injections. ## 🗒️ Model Details | Model | Parameters | Description | |---|---|---| | [`Inkling-2-Mini`](https://huggingface.co/thinkingmachines/Inkling-2-Mini) | 26.4B (3.4B active) | Looped-MoE base model (Apache 2.0) | | **[`squid-1`](https://huggingface.co/naluj/squid-1)** | 26.4B (3.4B active) | Rank-16 LoRA adapter (~742 MB) for calibrated single-pass decisions | - **Inputs**: text states (structured or free-form) and up to 62 options via single-token ASCII labels (`A–Z`, `a–z`, `0–9`) - **Adapter**: PEFT LoRA (`r=16`, `lora_alpha=32`, all linear layers) - **Inference**: single forward pass at `effort=0.0`; optional 2-pass parallel option-order averaging for stronger symmetry and calibration - **Max sequence length**: up to 32,768–65,536 tokens (middle-out truncation in serving preserves both state prefix and question/options) ## 🏃 How to use ### Request format (`/v1/systemone`) The [serving wrapper](https://github.com/naluj/squid) exposes a drop-in `/v1/systemone` API. A request carries one `state` and any number of `questions`: ```python questions = { "refund": { "type": "noul", "instructions": "Is the customer asking for a refund?", }, "team": { "type": "choice", "instructions": "Which team should handle this?", "criteria": { "billing": "Charges, refunds, invoices", "technical": "App or site faults", "fraud": "Suspected unauthorised use", }, }, "urgency": { "type": "score", "instructions": "How urgent is this?", "criteria": ["Can wait", "Today", "Blocking the customer now"], }, } request = { "state": "I was charged twice this month, please refund one of them.", "questions": questions, } ``` | `type` | `criteria` | answer fields | |---|---|---| | `noul`: yes or no | optional | `noul`: `P(yes)` | | `choice`: one of named options | `{name: description}` or `options` | `choice`, `probabilities` | | `score`: ordered levels | list of levels, lowest first | `score`, `probabilities` | ### PEFT / Transformers ```python import torch from transformers import AutoModelForMultimodalLM, AutoTokenizer from peft import PeftModel base_id = "thinkingmachines/Inkling-2-Mini" adapter_id = "naluj/squid-1" tokenizer = AutoTokenizer.from_pretrained(base_id) base = AutoModelForMultimodalLM.from_pretrained( base_id, dtype=torch.bfloat16, device_map="auto", ) model = PeftModel.from_pretrained(base, adapter_id).eval() ``` See [github.com/naluj/squid](https://github.com/naluj/squid) for the exact `effort=0.0` prompt renderer, FastAPI server (`scripts/serve.py`), and benchmark harnesses. ### Calibration Convert valid option-token logits to calibrated probabilities via per-type temperature scaling `p = softmax(logits / T)` (fit on a held-out calibration split): | Decision type | `choice` | `score` | `noul` | `default` | |---|---:|---:|---:|---:| | Temperature `T` | `1.08474` | `1.11195` | `0.93600` | `1.06966` | For best symmetry and Brier calibration, score the original and reversed option orders in parallel and average aligned probabilities: `0.5 * (p_orig + p_rev[::-1])`. ## 📊 Performance ### AA Decision Index v2.1 — Public-Component Proxy Evaluated locally across all 3 public-derived index components (40% of total index weight, 5,556 held-out items, 0 failures, 0 train–eval overlaps) with 2-pass symmetry averaging. | Benchmark (Index Weight) | `squid-1` | Notes | |---|---:|---| | EvalSafe-O\*NET-AA (15%) | **87.57** | `n=3,272` · `noul` 93.79, `choice` 81.66, `score` 78.63 | | When2Call (10%) | **88.12** | `n=1,775` · `request_for_info` 95.49, `tool_call` 86.09, `cannot_answer` 85.10 | | HLE-MultiChoice v1.1 (15%) | **47.75** | `n=509` · 60.9% decline rate | | **3-Component Weighted Proxy (40%)** | **72.77** | **Local proxy — not an official AA leaderboard score** | ### Zero-CoT Public Benchmarks Single-forward-pass (`effort=0.0`, zero generated tokens) accuracy, calibration, and selective-escalation metrics on untouched public benchmarks (0 train–eval overlaps): | Benchmark | `n` | Accuracy | Brier | ECE | Error AUROC | Top-80% Acc | |---|---:|---:|---:|---:|---:|---:| | GPQA-Diamond (2-pass) | 198 | 50.0% | 0.6079 | 0.0720 | 0.735 | 55.1% | | MMLU-Pro 1k (2-pass) | 1,000 | 62.2% | 0.5136 | 0.0881 | 0.802 | 70.1% | | Kev `decision-v7/test` (1-pass) | 1,324 | 82.6% | 0.2457 | 0.0254 | 0.834 | 89.7% | ### Post-Training Impact, Symmetry & Robustness