跳到正文
Hugging Face Transformers 官方项目· The HuggingFace Team·· 24 天前精选

JEV

AI 前沿

Copyright 2026 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

⚠️ Note that this file is in Markdown but contains specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer.

This model was contributed to Hugging Face Transformers on 2026-11-09.

JEV

Warning

Decision models, the decision pipeline and DecisionConfig are experimental: their API may change at any time, without deprecation.

JEV is a decision head that scores single-token labels with a linear layer at the last token of the prompt, soft-capped like the logits of a language model head. It was introduced by JEV and is also used by GEV.

[JevForDecision] is the model of the checkpoint and its head, like a ForCausalLM is the model and its lm_head. It reads the files that the checkpoint ships its head with, next to its weights (readout.safetensors and decision_config.json for vLLM decision models, head.safetensors and judge_config.json for JEV).

from transformers import pipeline

decide = pipeline("decision", model="autotrust/GEV-26B-Decide")
decide(
    {
        "state": "I was charged twice for my order and want a refund.",
        "questions": {"refund": {"type": "noul", "instructions": "Is a refund requested?"}},
    }
)

See the decision pipeline for image assets.

Without the pipeline, decision models are used like generate: the decision config renders a prompt per question (or one for all of them) with the chat template, decide scores the options of each question, and Question.answer turns the scores into answers:

Important

from_pretrained does not load the LoRA of checkpoints that keep it in a subfolder (decision_config.adapter, e.g. adapter/ for JEV). The pipeline loads it for you; without the pipeline, call load_adapter yourself as below, or the model answers with the base weights.

import torch
from transformers import AutoTokenizer, JevForDecision

repo = "autotrust/JEV-9B"
model = JevForDecision.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")
tokenizer, config = AutoTokenizer.from_pretrained(repo), model.decision_config  # read from the checkpoint's files
if config.adapter:  # JEV keeps its LoRA in a subfolder: `from_pretrained` doesn't load it, the pipeline does
    model.load_adapter(repo, adapter_kwargs={"subfolder": config.adapter})

request = {
    "state": "I was charged twice for my order and I want my money back today.",
    "questions": {
        "refund": {"type": "noul", "instructions": "Does the customer ask for a refund?"},
        "urgency": {"type": "score", "criteria": ["Can wait", "This week", "Today", "Now"]},
    },
}
answers = {}
for inputs, questions in config.prepare_inputs(request, tokenizer):
    scores = model.decide(**inputs, decision_questions=questions)
    answers |= {q.name: q.answer(s.softmax(-1).tolist()) for q, s in zip(questions, scores)}

The same head reads the 255 answer codes of pplx-decider and d3, whose Qwen3.5 backbone attends to the whole prompt (is_causal=False in the text_config of their JevForDecision). Their head (readout.safetensors) and settings (decision_config.json) are read as they are, next to their weights:

pipeline("decision", model="vllm-sr/d3")(request)  # or perplexity-ai/pplx-decider-v1.1-27b

JevConfig

[[autodoc]] JevConfig

JevForDecision

[[autodoc]] JevForDecision - forward

来源:Hugging Face Transformers 官方项目 · github.com

关系图

正在加载关系