Train your decision-model using ms-swift: with model-specific losses, automatic two-level temperature calibration and built-in Open-Jev data.
Also capable of converting causal language models into decision models, with generic_decision option. https://x.com/i/article/2114672362075627520
Decision Models with ms-swift: From Fundamentals to Hands-on Customization
0 Introduction
To support the growth of the open decision model ecosystem, ms-swift has recently added support for training and inference across a range of open decision models, including JEV-27B-VL, Clef, and OmniJev. The framework provides built-in decision datasets, dedicated loss functions, and a two-level temperature calibration mechanism, and automatically handles scoring head precision and weight loading.
ms-swift also provides a generic_decision conversion path that uses LoRA fine-tuning to turn general-purpose generative models into decision models that output probabilities for candidate options. In the JEV temperature calibration experiment, expected calibration error (ECE) fell by 46.7%, while prediction accuracy remained unchanged.
This article offers a comprehensive introduction to the development and technical foundations of decision models, then shows how to use ms-swift to train and optimize customized decision models for real-world applications. We hope to work with the open-source community to help this ecosystem thrive.
Open source • Code repository: https://github.com/modelscope/ms-swift
1 The Rise of Decision Models
1.1 Ecosystem Development
In September 2026, TypeSafe AI released Jev, the first decision model product deployed at scale. Positioned as a System One decision model, it generates no free-form text. Given a context x and a predefined set of candidate options, it directly outputs a calibrated probability for each option.
Implementation typically involves two steps: scoring and normalization. An encoder jointly encodes the context and options into hidden representations, a scoring head produces a scalar score for each option, and a softmax with temperature τ normalizes the scores.
Calibration means that predicted confidence agrees with the observed frequency of correct predictions. It is commonly measured by expected calibration error (ECE): examples are grouped into confidence bins, and ECE is the sum of the absolute differences between mean confidence and empirical accuracy in each bin, weighted by the number of examples in that bin. With autoregressive decoding removed, the entire set of options can be scored in a single forward pass. Delivered as a hosted service, Jev emphasizes judgment at machine speed across classification, routing, and scoring tasks.
Jev does not require a preset number of classes, generalizes well, and provides usable confidence estimates. These advantages helped the field take shape quickly. Different decision models emphasize different technical dimensions: at the model level, discriminative scoring coexists with probability extraction from generative models; at the decoding level, independent calls for individual questions complement joint decoding across multiple questions.
- The Generative Approach OpenAI Decisions
In October, one month after Jev’s release, OpenAI launched the Decisions service. Built on its own generative models, it exposes decision capabilities through a dedicated interface. The caller supplies a set of options; the interface extracts the logits for the initial tokens corresponding to those options from the generation distribution, applies temperature-scaled softmax normalization, and returns a probability for each option.
In other words, it does not train a new discriminative head. Instead, it channels the generative model’s existing knowledge through a dedicated interface. For users already working with OpenAI, this offers a relatively low-cost integration path.
Third-party research indicates that probabilities from this interface detect errors more effectively than the option-letter probabilities produced by the underlying generative model. The latter are the raw probabilities assigned to the corresponding letters in the first-token distribution when the generative model is prompted to output an answer letter directly.
The ability of confidence to distinguish correct from incorrect model answers can be measured by AUROC. Let c⁺ and c⁻ denote the confidence assigned to the selected answer for a randomly sampled correct prediction and a randomly sampled incorrect prediction, respectively. Then:
This is the probability that a correct prediction receives higher confidence than an incorrect prediction. A higher value means that confidence separates correct and incorrect answers more effectively.
- The Joint Decoding Approach Clef
Meanwhile, Cloudflare open-sourced Clef, demonstrating another decoding approach. Clef uses joint decoding across multiple questions: a single forward pass answers an entire set of structured questions, directly modeling the joint distribution of all answers rather than making repeated independent calls to compute separate marginal distributions.
In addition to avoiding repeated forward passes and repeated encoding of the same context, joint modeling captures correlations between questions, making it well suited to batch decisions organized as forms or checklists. With all weights and configurations openly available, Clef supports both private deployment and extensive customization.
- Open Implementations at Different Scales
The open-source community has shown considerable enthusiasm for decision models, rapidly producing implementations that explore different technical approaches. On ModelScope, we have seen open releases from a range of contributors.
JEV-27B-VL, open-sourced by autotrust, targets multimodal decision tasks. It retains a general-purpose multimodal encoder and output layer, reads each option’s log probability from the output distribution using a verbalizer, adds a bias, divides by a two-level temperature, and applies softmax. This introduces almost no new parameters, supports LoRA fine-tuning directly, and makes effective use of existing community deployment solutions such as vLLM.
OmniJev, meanwhile, is based on the Qwen3.5-4B hybrid architecture and supports image and video scoring with relatively modest deployment requirements. The accompanying Open-Jev dataset was also open-sourced during the same period.
At a smaller scale, NanoJev is based on Qwen3-0.6B and retains an architecture with per-candidate interactions: each option is concatenated with the context and independently encoded and scored by the model, after which the scores are normalized. It is commonly used for research and teaching. NeoHorse explores decision capabilities in agent-native settings and has attracted substantial downloads in the ModelScope community.
1.2 Comparison with Traditional Classification and Generative Tasks
Traditional classification methods typically require a task-specific classification head, often with retraining when the task changes. Decision models instead build on language models and unify scoring and classification into three question types: true/false, single-choice, and ordinal scoring. This architecture inherits the backbone’s semantic understanding and offers the potential for zero-shot generalization to unseen tasks.
For multiple-choice questions, generative models typically produce text that must then be parsed to extract the answer. Decision models directly compute the option probabilities in a single forward pass. Because they do not sample tokens one at a time, they generally offer lower inference latency for these structured-output tasks. Their probability distributions are also softmax-normalized over the options for the current question, making confidence scores comparable across options within that question.
The following figure compares the generative path with the decision-model path:
A study in October 2026 compared Jev, OpenAI Decisions, Clef, and conventional generative models on Korean and US medical licensing examinations. It found that generative models' predicted probabilities commonly saturated at 1.0, indicating pronounced overconfidence.
By contrast, the three decision models maintained high accuracy—83.4%–92.0% on Korean questions and 84.8%–87.7% on English questions—while their calibrated probabilities identified errors more effectively:
- Error detection (AUROC): 0.856–0.935 on Korean questions and 0.864–0.903 on English questions.
- Coverage by low-confidence answers: The 20% of answers with the lowest confidence captured more than half of all errors: 56%–91% on Korean questions and 62%–72% on English questions.
Routing these low-confidence samples to a stronger large language model for review could improve overall accuracy by 6–9 percentage points, at just 25%–33% of the cost of running the large model on every sample.
Errors captured by low-confidence samples:
This highlights an important difference between decision models and conventional generative model calls: when confidence itself is part of the product, unvalidated generation probabilities cannot simply be treated as reliable confidence estimates.
1.3 Use Cases
Any task whose output must be selected from a fixed option set is a target use case for decision models. Five common categories are:
- Content moderation and approval or authorization: Allow, reject, or defer, with reliable probabilities.
- Intent classification and routing: Route requests to the appropriate handler, escalating to a human when confidence is low.
- Quality and preference scoring: Assign ordinal scores to answers, translations, and generated content.
- Preference-based filtering in data pipelines: Filter synthetic data using probability thresholds.
- Confidence-based cascades: Have a decision model answer first, then send low-confidence samples to a large model to improve overall performance at lower cost.
2 The Technical Landscape
2.1 Types of Decision Models
Architectural differences between decision models primarily concern four dimensions: the source of the scoring head's signal, how candidates are serialized, how candidates interact, and the strategy for jointly modeling multiple questions. Along these dimensions, models with publicly disclosed architectures in the open-source community can be grouped into five types.
Decision-model taxonomy:
The five types serve different design goals. Token-readout models introduce almost no new parameters and can be fine-tuned directly with LoRA, making them suitable for adapting existing generative models. Hidden-state-readout models allow greater freedom in backbone selection and suit lightweight base models without a language output layer. Joint-decoder models use a heavier head to enable information exchange between questions, making them suitable for structured scenarios that require a set of questions to be judged jointly. Models with explicit per-candidate interaction trade computation for precise modeling of candidate relationships, suiting tasks with a moderate number of candidates and complex relationships. Multimodal specialists are designed end to end for visual inputs and ordinal scoring, making them suitable for image and video scoring.
These types emphasize different design dimensions and can overlap. A multimodal model, for example, may also use token readout. No type is universally superior; the choice depends on the task, deployment conditions, and the depth of customization required.
2.2 Loss Functions and Training Strategies
Loss functions and training strategies vary across decision model types, but share a common idea: the losses discussed here are proper scoring rules, meaning scoring functions that attain their optimum at the true distribution. In these implementations, they can be organized into a shared base term and additional calibration terms. The overall landscape is shown below:
All models include a shared base term: masked soft cross-entropy, which is fundamentally the logarithmic score (log score). With one-hot labels, it reduces to standard cross-entropy; with soft labels, it is equivalent to minimizing KL divergence. The mechanism performs masked computations in single precision without clipping probabilities, preserving gradient information even for highly confident incorrect predictions.
There are three calibration terms. The ranked probability score (RPS) measures the difference between the cumulative distributions of predictions and targets for ordinal-scoring questions. The Brier score computes mean squared probability error across all question types. Ordinal cross-entropy preserves the ordering of levels in ordinal-scoring tasks.
There are two approaches to combining the base and calibration terms. One uses a unified loss across all question types and leaves the architecture to handle their differences. JEV uses its verbalizer design to unify the three question types under temperature-aware soft cross-entropy. Clef encodes question types into its representations using type embeddings, without distinguishing question types in the loss formula.
The other selects a loss by question type. NanoJev uses cross-entropy for single-choice questions, binary cross-entropy for true/false questions, and ordinal cross-entropy for ordinal scoring, giving each question type its own training objective. The former emphasizes uniformity; the latter emphasizes task-specific objectives.
There are four corresponding training strategies. In the first, calibration parameters remain fixed after training. The second trains the scoring head first, then unfreezes all parameters. The third directly optimizes calibration as a reward signal. The fourth excludes calibration parameters from gradient-based training and fits the temperature separately on a validation set after training is complete.
3 Decision Model Support in ms-swift
ms-swift is an open-source training framework developed by the ModelScope team. Following the emergence of decision models, ms-swift quickly added training and inference support for several open implementations of this new model paradigm, along with built-in datasets.
3.1 Supported Models and Training Methods
To train a decision model with ms-swift, simply add --task_type decision to enable decision mode. ms-swift provides dedicated loss functions for different open-source decision models. For example, JEV-27B-VL uses distill_rps, which combines a distillation objective with RPS; Clef uses smooth_brier, which combines label-smoothed cross-entropy with the Brier score; and OmniJev uses ce_rps, which combines the plain log score with RPS. The framework also provides a general-purpose scoring mode without additional calibration terms.
The Open-Jev dataset is registered in the framework. Use --dataset open_jev_jev:all to train directly, without supplying your own data.
At the trainer level, ms-swift automates the following:
- Precision management: Automatically enables training of scoring-head parameters and promotes them to full precision; bias and temperature parameters always remain in single precision.
- Metric monitoring: Computes both per-question accuracy and per-record accuracy. The former evaluates questions individually; the latter requires every question in a record to be answered correctly, making it useful for joint-decoding scenarios.
- Separate weight storage: Saves scoring-head weights separately and loads them during inference through an automatic hook mechanism.
3.2 Temperature Calibration
Temperature calibration runs automatically through a post-training callback, which is attached whenever task_type=decision is used. No additional configuration is required. The full pipeline is shown below:
The two temperature levels are multiplied to obtain the effective temperature: the global temperature captures the model's overall confidence bias, while the relative temperature for each question type captures its specific bias. This can simultaneously correct underconfidence on true/false questions and overconfidence on scoring questions.
Reported metrics are out-of-sample estimates obtained through two-fold cross-validation. Records are split into two halves by odd and even indices, and the temperature applied to each half is fitted on the other half. At the start of training, the framework first evaluates a baseline using the original temperatures, allowing the logs to distinguish improvements from fine-tuning and calibration. Temperature scaling is a monotonic transformation of the logits: it does not change the predicted answer, but adjusts the sharpness of the probability distribution.
In the experiment using JEV's official factory temperature, ECE fell from 0.00268 to 0.00143, a reduction of 46.7%. A separate temperature ablation on 80 held-out records reduced ECE from 0.165 to 0.121 and the Brier score by 9.5%, with accuracy remaining exactly unchanged.
3.3 A Generic Conversion Path from Generative Models to Decision Models
In addition to the three officially supported models, ms-swift offers the generic_decision path, which converts a causal language model into a JEV-style decision model without replacing its backbone or changing its original architecture. The conversion pipeline is shown below:
Training command:
After training, use swift infer directly for inference. The model outputs the predicted option index and the probabilities of all options for each question, without generating free-form text. Adding --metric acc automatically computes accuracy on a decision dataset.
3.4 Training Results
Four models each completed the full pipeline: inference before training, training on a local dataset, and inference after training. The results are shown below:
All three official models improved in accuracy after fine-tuning with ms-swift. The general conversion path also demonstrated its feasibility: a standard chat model with no prior decision-task training improved from chance-level accuracy to 0.6667 after just one round of fine-tuning through generic_decision.
Summary
ms-swift now provides an end-to-end engineering workflow for the decision model paradigm. Users can enable dedicated loss functions and built-in dataset support simply by specifying --task_type decision. The framework automatically handles scoring head precision, two-level temperature calibration, and weight loading, while generic_decision enables the conversion of generative models into decision models.
In these experiments, fine-tuning increased accuracy by 37%–300% across the four models. The general-purpose chat model improved from chance level to 0.6667 after one epoch of training. In the JEV temperature calibration experiment, ECE fell by 46.7%, with prediction accuracy unchanged. These two sets of results reflect the respective contributions of task fine-tuning and probability calibration.
Going forward, ms-swift will continue to support new model architectures and expand flexible training and support for scoring heads. It will also explore bringing RLCD reinforcement learning into the open-source ecosystem to strengthen confidence-based cascades. For applications such as classification, routing, and scoring that depend on trustworthy probabilities, ms-swift already provides a standardized approach to training, inference, and evaluation.
