---
title: "Decision Models in Hugging Face"
description: "Decision models take a state plus a set of typed questions with predefined answers and return structured decisions with probabilities instead of generating text, avoiding schema violations and autoregressive decoding overhead."
url: "https://swe.quest/articles/decision-models-in-hugging-face-8e72d537e83c9634"
canonical: "https://huggingface.co/blog/decision"
source: "Hugging Face"
published: "2026-11-10"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 16
tags: ["llms","machine-learning","inference","python"]
---

# Decision Models in Hugging Face

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-11-10, 16 min read, Deep dive. Original: [https://huggingface.co/blog/decision](https://huggingface.co/blog/decision)

## Summary

Decision models take a state plus a set of typed questions with predefined answers and return structured decisions with probabilities instead of generating text, avoiding schema violations and autoregressive decoding overhead. Three primitives cover most cases: choice (softmax over options), score (expected value over an ordered scale), and noul (a Bernoulli probability for yes/no). Choice and score also report a confidence value that normalizes the top probability against a uniform distribution. The post compares the approach with fixed-label and zero-shot NLI classification and shows usage through a new transformers "decision" pipeline intended to give these models a common interface.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- softmax and probability distributions
- text classification

## Keywords

Hugging Face Transformers, decision models, zero-shot classification, GEV-26B-Decide, bart-large-mnli, Outlines, XGrammar

## Related posts

- [Introducing Decision Transformers on Hugging Face 🤗](https://swe.quest/articles/introducing-decision-transformers-on-hugging-face-53b9486d51c912ca.md): Hugging Face · 2022-03-28 · Medium · 8 min read · Machine learning, Python, Open source
  Decision Transformer, an offline reinforcement learning method that recasts RL as return-conditioned sequence modeling, is now part of the 🤗 transformers library, with nine pretrained checkpoints for Gym continuous-control tasks (Hopper, Walker2D, HalfCheetah).
- [Train your first Decision Transformer](https://swe.quest/articles/train-your-first-decision-transformer-d9877713a380ce1a.md): Hugging Face · 2022-09-08 · Hard · 8 min read · Model training, Machine learning, Python
  Decision Transformers recast reinforcement learning as conditional sequence modeling: a GPT-2 model takes the last K timesteps of return-to-go, state and action tokens and autoregressively predicts actions that achieve a desired return.
- [Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms](https://swe.quest/articles/introducing-anyspeechrecognizer-and-anydecisionmodel-open-models-for-speech-and-2746fca6b9690c89.md): Hugging Face · 2026-10-29 · Medium · 12 min read · Speech & audio, Swift, Inference & serving, LLMs, Machine learning
  AnySpeechRecognizer mirrors Apple's SpeechAnalyzer API but lets apps swap in other engines (NVIDIA Parakeet v3/Ultra/Unified and Alibaba Qwen3-ASR on Core ML) and adds Sortformer-based speaker diarization for up to four speakers.
- [Few-shot learning in practice: GPT-Neo and the 🤗 Accelerated Inference API](https://swe.quest/articles/few-shot-learning-in-practice-gpt-neo-and-the-accelerated-inference-api-08cde6019b028379.md): Hugging Face · 2021-06-03 · Medium · 6 min read · LLMs, Inference & serving, AI safety, Python
  Few-shot learning lets a large language model perform a new NLP task from a handful of examples supplied in the prompt (task description, examples, and a prompt to complete), avoiding the labeled data needed for fine-tuning.
- [SetFitABSA: Few-Shot Aspect Based Sentiment Analysis using SetFit](https://swe.quest/articles/setfitabsa-few-shot-aspect-based-sentiment-analysis-using-setfit-1531f1fb3bd2dc96.md): Hugging Face · 2023-12-06 · Medium · 9 min read · Machine learning, Model training, Python
  SetFitABSA performs few-shot aspect-based sentiment analysis in three stages: spaCy extracts noun and noun-compound aspect candidates, one SetFit model classifies each candidate as aspect or non-aspect, and a second SetFit model assigns a sentiment polarity to each aspect.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
