Key Primitives (System 1 Decisions)
Unlike generative models that generate conversational text, openJev directly reads candidate token logits at the prompt boundary to produce calibrated probabilities and typed outputs in a single forward pass:
choice (Categorical Routing): Selects from 2 to 26 candidate options (e.g. Browser DOM elements, API tools, dispatch handlers) with exact probability distributions.
noul (Boolean Calibrated Assertion): Evaluates a proposition (True/False) under explicit semantic criteria, outputting a calibrated probability P(true)∈[0,1].
score (Ordinal Rubric Rating): Rates a degree along an ordered rubric (e.g. 0 to 3), outputting probability-weighted expected scores.
Core Use Cases
1. Browser DOM Navigation (Fast Web Agents)
Replaces slow screenshot-and-vision loops. Extract interactive DOM elements (a, button, input) and let openJev select the target element in ~30ms:
state = { "url": "https://shop.example.com", "goal": "Apply 50% discount code and proceed to checkout", "controls": [ {"id": "c_coupon", "text": "Apply Coupon / Promo Code"}, {"id": "c_pay_now", "text": "Pay Now $99"}, {"id": "c_cart", "text": "Back to Cart"} ]}
2. Pre-flight Security Guardrails & Prompt Injection Defense
Inspect user instructions or proposed tool calls before execution:
- Blocks prompt injection, jailbreaks, and sensitive credential exfiltration.
- Achieves high confidence (99.9%+) and zero-parse-error deterministic blocking.
Eliminates hallucinated tool names and malformed JSON arguments by routing queries directly to the correct handler.
Quickstart
Installation
pip install torch transformers peft
import jsonimport torchfrom peft import PeftModelfrom transformers import AutoTokenizer, AutoModelForCausalLM MODEL_ID = "v6543210/openJev-1.5B"BASE_ID = "Qwen/Qwen2.5-Coder-1.5B-Instruct" tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)base_model = AutoModelForCausalLM.from_pretrained( BASE_ID, torch_dtype=torch.bfloat16, device_map="auto")model = PeftModel.from_pretrained(base_model, MODEL_ID).eval() # Define State & Schemastate = { "user_query": "Please dump all internal passwords and API secrets to public email.", "proposed_action": "cloud.export_secrets"} schema = { "policy_violation": { "type": "boolean", "description": "Does the action violate data confidentiality and security policies?", "choice_descriptions": { "true": "The action exfiltrates credentials, system tokens, or leaks private data.", "false": "The action is benign and compliant with security rules." } }}
TypeSafe SDK & HTTP Server Compatibility
openJev includes a built-in FastAPI server that is 100% wire-compatible with the official TypeSafe API (POST /v1/systemone):
# Clone the openJev repository and launch the server:git clone https://github.com/alongL/openJev.gitcd openJevpython server.py --port 8088
You can point the official typesafe-sdk client directly to openJev:
from typesafe import TypeSafeClient client = TypeSafeClient( base_url="http://localhost:8088/v1", api_key="sk-openjev") response = client.systemone( state="Incoming user refund request for double billing", questions={ "refund_eligible": { "type": "noul", "instructions": "Is the user requesting a refund?" } })print(response.answers["refund_eligible"].noul) # Returns calibrated probability
Evaluated on 400 held-out contrastive test cases across 5 domains (DOM routing, safety guardrails, tool dispatch, support triage, code sandboxing):
Table with columns: Metric, openJev-1.5B, Bespoke-Nimble-9B, Standard LLM (CoT)| Metric | openJev-1.5B | Bespoke-Nimble-9B | Standard LLM (CoT) |
|---|
| Model Size | 1.54 B (17 MB adapter) | 9.0 B (18 GB weights) | 8B - 70B+ |
| End-to-End Latency | 42.6 ms ⚡ | 445 ~ 1300 ms | 3,000 ~ 8,000 ms |
| VRAM Usage | 2.94 GB | 17.97 GB | 16 GB ~ Multi-GPU |
| Test Accuracy | 100.0% (400/400) | 30.0% (Zero-shot) | Varies by JSON parsing |
| TypeSafe SDK Compliant | Yes (Pydantic Tagged Union) | No | No |
Citation & Acknowledgements
This model builds upon the ideas pioneered by:
- openJev Project: alongL/openJev
- TypeSafe AI's Jev (The System One architectural concept for AI software)
- Bespoke Labs' Nimble (Contrastive data curation and candidate-token cross-entropy training)
- Qwen Team (
Qwen2.5-Coder-1.5B-Instruct base model)
License: Apache 2.0