Instructions to use typestrict/TS-Ettin-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typestrict/TS-Ettin-150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="typestrict/TS-Ettin-150M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("typestrict/TS-Ettin-150M") model = AutoModel.from_pretrained("typestrict/TS-Ettin-150M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Train your own on typestrict.ai |
Docs |
MCP for AI assistants |
CLI |
All TS models
License: Apache 2.0 |
Authors: typestrict.ai
TS-Ettin-150M
The typestrict recipe on the Ettin reranker: the strongest of our bases on the Decision Index, for decisions in English.
Train on it today at typestrict.ai: pick it as the base model (
ts-ettin-150m). TS-moBERTo-150M stays the default; train both and keep the version that wins on your held-out examples.
The confidence of this model is not calibrated yet (identity settings in
config.json): use the probabilities, and measure before setting an automation threshold onconfidence.
- Typed decisions:
choice(one option out of many),noul(is this statement true) andscore(a value on an ordered rubric), each with the probability of every option and a confidence. - Small and fast: 150M parameters, English, 8,192 tokens of context, with ONNX files that run on a CPU.
- Open: Apache-2.0 weights, trained only on data whose license allows it (listed below).
- The base of every typestrict model: send your data to typestrict.ai and get a model that answers your own question, measured against Jev on your held-out examples.
๐งญ The TS family
Every TS model follows the same recipe on the same data, so trying another one is a new version of the same training.
| Model | Size | Languages | On typestrict.ai |
|---|---|---|---|
| TS-moBERTo-150M | 150M | English and Portuguese | Available, recommended |
| TS-Ettin-150M | 150M | English | Available |
| TS-Ettin-68M | 68M | English | Available |
| TS-Ettin-32M | 32M | English | Available |
| TS-Ettin-17M | 17M | English | Available |
| Model | Size | Languages | On typestrict.ai |
|---|---|---|---|
| TS-moBERTo-150M | 150M | English and Portuguese | Available, recommended |
| TS-Ettin-150M | 150M | English | Available |
| TS-Ettin-68M | 68M | English | Available |
| TS-Ettin-32M | 32M | English | Available |
| TS-Ettin-17M | 17M | English | Available |
๐ Results
Decision Index 0.3
The public index of the Decision Index 0.3, in our lab's run: the encoder alone, then with the code and calculator experts that ship with TS-moBERTo-150M. Measured on public benchmarks, not on your task: a model trained on typestrict is measured on your own examples.
| Model | Encoder alone | With code and calculator experts |
|---|---|---|
| TS-moBERTo-150M | 31.20 | 33.89 |
| TS-Ettin-150M | 31.96 | 34.78 |
| TS-Ettin-68M | 27.61 | 30.46 |
| TS-Ettin-32M | 19.70 | 22.45 |
| TS-Ettin-17M | 15.76 | 18.52 |
| Model | Encoder alone | With code and calculator experts |
|---|---|---|
| TS-moBERTo-150M | 31.20 | 33.89 |
| TS-Ettin-150M | 31.96 | 34.78 |
| TS-Ettin-68M | 27.61 | 30.46 |
| TS-Ettin-32M | 19.70 | 22.45 |
| TS-Ettin-17M | 15.76 | 18.52 |
Held-out typed decisions
Held-out sets of 1,000 items each, accuracy:
| Set | Accuracy |
|---|---|
| Typed decisions, English (PyTorch) | 0.709 |
| Typed decisions, English (ONNX int8) | 0.704 |
| Set | Accuracy |
|---|---|
| Typed decisions, English (PyTorch) | 0.709 |
| Typed decisions, English (ONNX int8) | 0.704 |
๐ Quickstart
The inference code ships in this repository (dinah.py). On a CPU, with the int8 ONNX file:
pip install huggingface_hub onnxruntime transformers numpy
import importlib.util
from huggingface_hub import hf_hub_download
REPO = "typestrict/TS-Ettin-150M"
spec = importlib.util.spec_from_file_location("dinah", hf_hub_download(REPO, "dinah.py"))
dinah = importlib.util.module_from_spec(spec)
spec.loader.exec_module(dinah)
model = dinah.DinahONNX.from_pretrained(REPO) # or dinah.Dinah for PyTorch
print(model.choice(
state="My card still has not arrived. How can I track the delivery?",
criteria={
"payment": "A problem with a payment or a charge",
"card_delivery": "Delivery or shipping of the card",
"cancel": "Cancel the card or the account",
},
instructions="What is the customer's message about?",
))
# What this model answers here: "card_delivery", probability 0.983, confidence 0.989
noul and score work the same way (model.noul(...), model.score(...)); model.predict([...]) answers a batch. This is the base model, before any training on your data: for your own decision, train it on typestrict.ai.
๐ Train your own on typestrict.ai
TS-Ettin-150M is a base: it already reads language and makes typed decisions. On typestrict.ai it learns your decision (your queues, teams, products, intents) from your data, and the result is measured against Jev, the market reference model, on examples held out from training. If it does not beat Jev, the credit comes back.
In the web app: upload a spreadsheet, a folder of documents or a public dataset at typestrict.ai, review what the agent proposes, and train.
From your AI assistant (ChatGPT, Claude, Cursor, Codex, Copilot and others), with the remote MCP server:
claude mcp add --transport http typestrict https://api.typestrict.ai/mcp
From a terminal or CI, with the typestrict CLI:
curl -fsSL https://typestrict.ai/install.sh | sh && typestrict login
typestrict train tickets.csv --goal "Which team handles the ticket?" --base ts-ettin-150m --watch
The trained model comes as a small package (decision_ai.json, tokenizer.json, onnx/model_8bit.onnx) that runs on your own servers, in a container, or inside a Flutter app with decision_ai. Setup for every assistant: docs.typestrict.ai/agents.
๐๏ธ Model details
| Property | TS-Ettin-150M |
|---|---|
| Parameters | 150M |
| Architecture | Bidirectional encoder with a typed-decision head |
| Starts from | Ettin reranker 150M (Apache-2.0) |
| Languages | English |
| Context length | 8,192 tokens (longer examples are refused, never cut) |
| Question types | choice, noul, score, with probabilities and a confidence |
| Runs on | CPU (ONNX) or GPU (PyTorch) |
| typestrict id | ts-ettin-150m |
| License | Apache-2.0 |
| Property | TS-Ettin-150M |
|---|---|
| Parameters | 150M |
| Architecture | Bidirectional encoder with a typed-decision head |
| Starts from | Ettin reranker 150M (Apache-2.0) |
| Languages | English |
| Context length | 8,192 tokens (longer examples are refused, never cut) |
| Question types | choice, noul, score, with probabilities and a confidence |
| Runs on | CPU (ONNX) or GPU (PyTorch) |
| typestrict id | ts-ettin-150m |
| License | Apache-2.0 |
๐ Training data
Two stages (2,048 tokens, then 8,192) and an average of both, on the same mixture for every TS model. Each source with the license its own card declares; sources under CC BY-SA and CDLA-Sharing are used for training only and are not redistributed. The training blocks were checked against the Decision Index's public test rows (exact and near-duplicate removal, and 8-gram overlap for the newest blocks).
| Area | Sources |
|---|---|
| Typed decisions | ZefanCai/Open-Jev (CC0-1.0), LocalLLaMA/typed-decisions (Apache-2.0), typed-decisions-pt translated with Qwen3-4B (Apache-2.0), tasksource/procedural-typed-decisions (Apache-2.0) |
| Intents and customer support | AmazonScience/massive (CC BY 4.0), Bitext customer support (CDLA-Sharing-1.0), BANKING77 (CC BY 4.0), CLINC150 (CC BY 3.0), FAQ_BACEN (Apache-2.0) |
| Inference and fact checking | WANLI (CC BY 4.0), SNLI (CC BY-SA 4.0), HoVer (CC BY-SA 4.0), FEVER-NLI (MIT; FEVER and Wikipedia CC BY-SA 3.0), ContractNLI (CC BY 4.0), bAbI-NLI (BSD), FaQuAD-NLI (CC BY 4.0), ExtraGLUE RTE and COPA in Portuguese (MIT) |
| Reasoning and knowledge | CommonsenseQA (MIT), Cosmos QA (CC BY 4.0), BoolQ (CC BY-SA 3.0), HellaSwag (MIT), WinoGrande (Apache-2.0), ARC train split (CC BY-SA 4.0), QASC (CC BY 4.0), StrategyQA (MIT), BIG-bench tasks without BBH (Apache-2.0), MMLU auxiliary train, ARC and OpenBookQA parts (MIT), GSM8K (MIT), CLadder (MIT) |
| Health, finance and law | PubMedQA (MIT), MedMCQA (Apache-2.0), twitter-financial-news-sentiment (MIT), financial-tweets-sentiment (MIT), NOSIBLE financial-sentiment (ODC-By), FinQA hallucination detection (MIT), pyRis/SEntFiN (MIT), CUAD (CC BY 4.0), jurisprudencias_br (CC BY 4.0), IBM Claim Stance (CC BY 3.0) |
| Sentiment, emotion and moderation | GoEmotions (Apache-2.0), Civil Comments (CC0-1.0), iSarcasmEval (MIT), B2W-Reviews01 (CC BY 4.0), multilingual-sentiments in Portuguese (Apache-2.0) |
| Retrieval and hallucination | ESCI (Apache-2.0), HaluEval (Apache-2.0), RAGTruth (MIT), CNN/DailyMail (Apache-2.0), SQuAD 2.0 (CC BY-SA 4.0) |
| Tools | glaive-function-calling-v2 (Apache-2.0), ToolACE (Apache-2.0), hermes-function-calling-v1 (Apache-2.0), nvidia/When2Call (CC BY 4.0) |
| Phishing | LLMGen-Phishing-Email-Dataset (Apache-2.0), aura-phishing-email-corpus, SpamAssassin part (CC BY 4.0) |
| Chess | Lichess puzzles (CC0-1.0), google-deepmind/searchless_chess (Apache-2.0) |
| Humor | newyorker_caption_contest, matching task (CC BY 4.0) |
| Made by us | English to Portuguese translations with opus-mt-tc-big-en-pt (CC BY 4.0); synthetic phishing emails written with gpt-oss-120b, labels set by code (Apache-2.0); synthetic home-appliance households, RAG hallucination examples and programmatic skills (arithmetic, dates, units, sorting, graphs, code output), generated by our scripts (MIT and Apache-2.0) |
| Area | Sources |
|---|---|
| Typed decisions | ZefanCai/Open-Jev (CC0-1.0), LocalLLaMA/typed-decisions (Apache-2.0), typed-decisions-pt translated with Qwen3-4B (Apache-2.0), tasksource/procedural-typed-decisions (Apache-2.0) |
| Intents and customer support | AmazonScience/massive (CC BY 4.0), Bitext customer support (CDLA-Sharing-1.0), BANKING77 (CC BY 4.0), CLINC150 (CC BY 3.0), FAQ_BACEN (Apache-2.0) |
| Inference and fact checking | WANLI (CC BY 4.0), SNLI (CC BY-SA 4.0), HoVer (CC BY-SA 4.0), FEVER-NLI (MIT; FEVER and Wikipedia CC BY-SA 3.0), ContractNLI (CC BY 4.0), bAbI-NLI (BSD), FaQuAD-NLI (CC BY 4.0), ExtraGLUE RTE and COPA in Portuguese (MIT) |
| Reasoning and knowledge | CommonsenseQA (MIT), Cosmos QA (CC BY 4.0), BoolQ (CC BY-SA 3.0), HellaSwag (MIT), WinoGrande (Apache-2.0), ARC train split (CC BY-SA 4.0), QASC (CC BY 4.0), StrategyQA (MIT), BIG-bench tasks without BBH (Apache-2.0), MMLU auxiliary train, ARC and OpenBookQA parts (MIT), GSM8K (MIT), CLadder (MIT) |
| Health, finance and law | PubMedQA (MIT), MedMCQA (Apache-2.0), twitter-financial-news-sentiment (MIT), financial-tweets-sentiment (MIT), NOSIBLE financial-sentiment (ODC-By), FinQA hallucination detection (MIT), pyRis/SEntFiN (MIT), CUAD (CC BY 4.0), jurisprudencias_br (CC BY 4.0), IBM Claim Stance (CC BY 3.0) |
| Sentiment, emotion and moderation | GoEmotions (Apache-2.0), Civil Comments (CC0-1.0), iSarcasmEval (MIT), B2W-Reviews01 (CC BY 4.0), multilingual-sentiments in Portuguese (Apache-2.0) |
| Retrieval and hallucination | ESCI (Apache-2.0), HaluEval (Apache-2.0), RAGTruth (MIT), CNN/DailyMail (Apache-2.0), SQuAD 2.0 (CC BY-SA 4.0) |
| Tools | glaive-function-calling-v2 (Apache-2.0), ToolACE (Apache-2.0), hermes-function-calling-v1 (Apache-2.0), nvidia/When2Call (CC BY 4.0) |
| Phishing | LLMGen-Phishing-Email-Dataset (Apache-2.0), aura-phishing-email-corpus, SpamAssassin part (CC BY 4.0) |
| Chess | Lichess puzzles (CC0-1.0), google-deepmind/searchless_chess (Apache-2.0) |
| Humor | newyorker_caption_contest, matching task (CC BY 4.0) |
| Made by us | English to Portuguese translations with opus-mt-tc-big-en-pt (CC BY 4.0); synthetic phishing emails written with gpt-oss-120b, labels set by code (Apache-2.0); synthetic home-appliance households, RAG hallucination examples and programmatic skills (arithmetic, dates, units, sorting, graphs, code output), generated by our scripts (MIT and Apache-2.0) |
Links
- typestrict.ai: typestrict.ai, the docs at docs.typestrict.ai (for assistants: llms-full.txt)
- Open source: CLI and MCP server, skills for AI assistants, decision_ai for Flutter
- Contact: typestrict.ai/contact
Citation
@misc{typestrict2026tsettin150m,
author = {{typestrict.ai}},
title = {TS-Ettin-150M: a typed-decision encoder},
year = {2026},
url = {https://huggingface.co/typestrict/TS-Ettin-150M}
}
- Downloads last month
- 13
Model tree for typestrict/TS-Ettin-150M
Base model
jhu-clsp/ettin-encoder-150m
