Decision Models in Hugging Face
In one sentence
Hugging Face introduces decision models, which output probability distributions over predefined choices without generating text, streamlining structured decision-making tasks.
Key points
- Decision models take an input state and questions with predefined options, returning structured decisions and probabilities without token-by-token text generation.
- Compared to prompting LLMs for JSON, decision models avoid schema errors, unnecessary decoding overhead, and out-of-scope answers.
- Inspired by 'System One models', the community converged on the term 'decision model' to describe its computational role.
- Unlike traditional and zero-shot classification, decision models natively support multiple typed questions—such as choice, score, and yes/no—for the same state.
In depth
An AI-written overview of the original article, not the article itself.
Hugging Face Blog published an article introducing decision models, an approach that evaluates context and returns probability distributions over predefined answers without generating text. For structured tasks like routing customer support tickets, this avoids the overhead and schema-following issues of prompting Large Language Models.
How Decision Models Work
A decision model takes an input state, such as a customer message, and evaluates multiple questions against allowed answers. Using the transformers library, developers can call the decision pipeline with models like autotrust/GEV-26B-Decide.
TypeSafe AI originally called its Jev model a System One model, referencing fast intuitive thinking, before the community adopted the term decision model. Unlike LLMs, which risk producing invalid JSON or require constrained decoding tools like Outlines and XGrammar, decision models skip autoregressive text generation entirely.
Three Primitives and Confidence
The interface supports three question types. Choice selects one option from distinct alternatives using softmax probabilities. Score evaluates an ordered scale, such as urgency levels, by computing the expected value of the probability distribution.
Noul, named after the Bernoulli distribution, handles binary yes-or-no questions by returning the probability that a statement is true. For Choice and Score, the output also includes a confidence value ranging from 0 for uniform distributions to 1 for complete certainty.
Beyond Traditional and Zero-Shot Classification
Traditional classifiers bake fixed labels into their classification heads, requiring retraining when new categories are added. Zero-shot classification, such as NLI-based models like facebook/bart-large-mnli, allows runtime labels but only handles single categorization tasks.
Decision models build on these ideas by organizing runtime-defined labels, ordered scoring, and binary probabilities into a single consistent interface that handles multiple typed questions simultaneously.
This summary was generated by AI from the original article and may contain errors; the original is authoritative. Copyright belongs to the original author.