Skip to content

Repository files navigation

JevAny: Your Jev from Any Model to Any Application

Checkpoints API docs Examples Python 3.12+ Tests License

English | 简体中文

Train and serve Jev-style decision models with JevAny: fine-tune an open language model or use our pretrained checkpoint. The shared Python and HTTP APIs follow the Jev format, taking a state, question, and candidate answers and returning a choice with per-option probabilities.

JevAny workflow: train a Jev model with multi-modal data and RLCR/SFT, then deploy through a unified API with test environments and practical examples

Start here What JevAny provides
Training Training data and shared SFT/RLCR infrastructure
Inference & Serving Pretrained models, a shared API, test environments, and application examples

Demos

Examples built with JevAny-27B-SFT:

JevAny choosing actions across robotics, browser, software, laboratory and mobility tasks

Explore 30 selected successful runs, or try your own model with the examples and test environments.

Installation

Use Python 3.12 or newer. Clone the repository and create an environment:

git clone https://github.com/weitianxin/JevAny.git
cd JevAny
python3.12 -m venv .venv
source .venv/bin/activate

Choose the dependencies for your use case:

Use case Install
Call an existing HTTP server python -m pip install -e .
Train a text model python -m pip install -e '.[train]'
Run a text model locally or serve it over HTTP python -m pip install -e '.[serve]'
Run the released 27B models with native media support python -m pip install -e '.[serve,multimodal]'

The client-only installation does not install PyTorch. For image/video training, use .[train,multimodal]. Run the commands below from the repository root; model-specific hardware requirements are listed under Pretrained Models.

Training

Training Data

Training uses the same state and questions as inference, with a label added to each question.

Data What is available Start here
Included starter Small synthetic dataset for learning the workflow jevany data init --out data/starter
Public-source builders Text, image and video decision data Data-building guide
Your own data Labelled requests in the shared JSONL format Format and examples

Prepare and validate the starter before training:

jevany data init --out data/starter
jevany data validate data/starter/train.jsonl

SFT

Supervised fine-tuning fits a Jev model to labelled decisions. Run the starter recipe on a CUDA GPU:

jevany train --config recipes/sft.toml --dry-run
jevany train --config recipes/sft.toml

The checkpoint is saved to runs/my-jev. To use your own data, add --data data/my-domain.jsonl --out runs/domain-jev. To adapt a released Jev model, use recipes/finetune.toml.

RLCR

Reinforcement Learning with Calibration Rewards continues SFT with a reward based on both correctness and confidence. After completing the SFT recipe above, run:

jevany train --config recipes/rlcr.toml

This recipe continues training from runs/my-jev and saves to runs/my-jev-rlcr. RLCR is under active development; see the training objective.

See the training guide for supported backbones, image and video capabilities, and local GPU setup.

Pretrained Models

Model Intended use
JevAny-27B-SFT Default released model
JevAny-27B-RLCR Experimental RLCR continuation

Both releases load a 27B vision-capable base on first use. Allow about 54 GB for BF16 base weights, plus runtime memory, on a single device. You can also train a smaller model and serve it through the same API. See the hardware and loading guide.

Inference & Serving

Python API

With an HTTP server running, send a state and a question with named options. The answer contains the selected option and each option's probability:

from jevany import Choice, JevClient

state = {"ticket": "I was charged twice. Please help."}
questions = {
    "department": Choice(
        instructions="Which team should handle this?",
        criteria={"billing": "Payment problems", "shipping": "Delivery problems"},
    ),
}

jev = JevClient("http://127.0.0.1:8008")
result = jev.system_one(state=state, questions=questions)
answer = result["answers"]["department"]
print(answer["choice"])
print(answer["probabilities"])

Use Noul for binary questions and Score for ordered levels. The API reference describes all three question types and the Jev-compatible request/answer format.

HTTP Server

For the default released model, install .[serve,multimodal] and use hardware that meets the 27B requirements:

jevany serve --checkpoint tianxinwei/JevAny-27B-SFT \
  --device cuda --dtype bf16 --port 8008

To serve the smaller model from the SFT example instead:

jevany serve --checkpoint runs/my-jev --model-name my-jev --port 8008

In-Process Inference

Load a checkpoint once in your application and reuse state and questions from the example above:

from jevany import JevModel

jev = JevModel.from_pretrained("runs/my-jev", model_name="my-jev")
result = jev.system_one(state=state, questions=questions)

See the deployment guide for more ways to call a model and media setup for image and video inputs.

Examples & Test Environments

Open the playground in your local browser. The included replays need no GPU, model download, or inference server:

python -m pip install -e .
jevany demo

These GIFs show accelerated replays of JevAny-27B-SFT controlling the environments. Each replay preserves the model's actual choices and original option probabilities.

Use a Franka gripper to grasp, align and insert a peg, checked by PyBullet contact physics.

Robot browser replay showing the Franka arm inserting a peg, recorded model probabilities and physical success checks

Start in the final room, kill the enemies on the left and right, then move forward through the cleared room. Uses ViZDoom and the included Freedoom assets.

Doom checkpoint replay: kill both enemies, then advance

Gather wood, craft tools and mine stone while managing health and supplies.

Crafter browser replay showing resource gathering, crafting actions and progress through four goal milestones

Live control

Install the optional game engines to play yourself, or connect a running model server and choose Run model in the browser:

python -m pip install -e '.[demo]'
jevany demo --base-url http://127.0.0.1:8008 --text-only

Live model runs currently use text state. Robot control uses the separate .[robotics] extra. See the playground guide for setup, platform requirements and environment APIs, or integrations to combine Jev decisions with an LLM planner.

Evaluation

JevAny-27B SFT and RLCR accuracy on the transfer suite and public benchmark subsets; MMStar and MVBench have SFT results only

Full results and evaluation protocols.

Supported Model Families

26 supported models across Qwen, Gemma, Muse, Mistral, GLM, Nemotron and Llama

Model IDs, supported inputs and setup requirements.

Documentation and Contributing

Training · Deployment · API compatibility · Data · Evaluation · Contributing

JevAny is independent of Jev and TypeSafe and includes no Jev weights or private implementation. It includes infrastructure adapted from Kev; see NOTICE and ACKNOWLEDGEMENTS.md. Code and starter data are Apache-2.0. Base models and upstream datasets retain their own terms.

About

Calibration-aware reinforcement learning for adaptive decision systems

Topics

Resources

Contributing

Stars

17 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages