Run this model with HF Jobs

Run taoszhang/JevAgent-Base-27B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/taoszhang/JevAgent-Base-27B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/taoszhang/JevAgent-Base-27B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

JevAgent-Base-27B

JevAgent-Base-27B is the general decision model used to initialize the game and mobile GUI agents in JevAgent: Bringing Decision Models into Agent Systems. It maps a state, question and candidate descriptions to a probability distribution in one forward pass. The state can contain text and optional images.

The model supports three question types:

Type Input Main output
choice Named candidate descriptions Selected key and candidate probabilities
noul A proposition, optionally with false/true descriptions noul: probability that the proposition is true
score An ordered list of level descriptions score: expected zero-based level index and level probabilities

Installation and loading

pip install -r requirements.txt

Use matching PyTorch and torchvision builds for your CUDA version. The saved processor initializes both image and video components and requires torchvision even for image-only requests.

import torch
from transformers import AutoModel

# A downloaded model directory or the model's Hugging Face repository ID.
model = AutoModel.from_pretrained(
    "taoszhang/JevAgent-Base-27B",
    trust_remote_code=True,
    dtype=torch.bfloat16,
    device_map="auto",
    use_fla_kernels=False,
)

The checkpoint contains approximately 52.2 GB of model and processor files. Allow additional memory for image processing and intermediate activations. use_fla_kernels=True enables optional flash-linear-attention kernels on CUDA when available. Standard Transformers kernels are used otherwise.

Choice

result = model.decide(
    state="A red ball is to the left of a blue cube.",
    question={
        "type": "choice",
        "instructions": "Which object is on the left?",
        "criteria": {"ball": "The red ball", "cube": "The blue cube"},
    },
)
print(result["choice"], result["probabilities"])

Choice accepts 1โ€“255 candidates. The selected choice is a key from criteria. For the list form, provide options and optional option_keys; generated keys default to option_000, option_001, and so on. Candidate order is preserved.

result = model.decide(
    state="Choose the next movement using the visible scene.",
    images=["frame.png"],
    instructions="Which movement should be executed next?",
    options=["Move left", "Move right", "Wait"],
)

Noul and Score

truth = model.decide(
    state="The triangle has three sides.",
    question={"type": "noul", "instructions": "The shape has three sides."},
)
print(truth["noul"])

rating = model.decide(
    state="The response answers every requested point with supporting evidence.",
    question={
        "type": "score",
        "instructions": "Rate how completely the response addresses the request.",
        "criteria": ["Incomplete", "Partly complete", "Complete"],
    },
)
print(rating["score"], rating["probabilities"])

Noul uses the fixed order false, true. Score requires 2โ€“255 ordered levels; the example's expected score ranges from 0 to 2. Level descriptions are labels, not numerical weights. choice_index gives the most probable level when a discrete prediction is needed.

Batch inference and dataset records

import json

with open("train.jsonl", encoding="utf-8") as stream:
    records = [json.loads(next(stream)) for _ in range(4)]

results = model.decide_batch(records, batch_size=2, image_root=".")

Each record supplies state, question and optional images. Both native criteria and the JevAgent-SFT options/option_keys format are accepted. Images may be paths, PIL images or base64 image data URLs. Relative paths are resolved under image_root. Images stay in the supplied order.

Every result includes type, choice_index (zero-based), option_keys, probability_values, raw logits for the valid candidates, and input_tokens. Choice and Score also return the native keyed probability distribution and confidence value. Noul returns the native truth probability.

Inference settings

  • Saved calibration temperature: 1.0379549814593256.
  • Decision head computation: BF16, with logits converted to FP32 before softmax.
  • Full-attention layers use bidirectional SDPA with padding masks; linear-attention recurrence is preserved.
  • Default input limit: 8,192 tokens, including image tokens. Longer inputs raise an error without silently truncating the state. max_length can be overridden explicitly; the default reflects the general training setup.
  • Image pixel limits: 65,536โ€“1,638,400 per image, processed by the saved processor.

model(**processor_inputs) returns raw [batch, 255] logits. Use decide or decide_batch for valid-candidate masking, calibration and typed answers.

Downloads last month
26
Safetensors
Model size
26B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support