von README

The project's README from github.com/wfzyx/von. As one markdown file: README.md.

Von

An Open-Source, Non-Autoregressive System One Decision Model.
Calibrated discrete, probabilistic, and ordinal inference in sub-25ms.

Hugging Face License Python TypeScript


Von choosing movement and combat actions in Doom, 29 seconds of unedited gameplay

Von playing Doom. Every movement decision — advance, back off, sidestep a fireball — is one forward pass scoring six option descriptions against a text rendering of the depth buffer. No policy network, no fine-tuning, no reinforcement learning: the same shipped von-1.1 weights that answer routing questions, wired to a game loop. 33 kills, 36 dodges, 80 seconds, on a single T4.


Overview

Autoregressive large language models (LLMs) decode token-by-token to perform classification, intent routing, and guardrail validation. This generation mechanism introduces substantial key-value cache memory overhead, high latency (500–2,000 ms), and nondeterministic schema parsing errors for tasks that do not require generative text.

Von implements the System One computational paradigm: reflexive, parallel, deterministic, and statistically calibrated decision-making. Operating entirely in-process or via an HTTP server, Von evaluates arbitrary discrete and continuous criteria directly over input state in a single forward pass without autoregressive text generation.

Key Capabilities


Empirical Benchmark

Von is evaluated across two independent empirical suites:

  1. Multi-Domain Language & Logic Generalization: The 49-task, 869-case jabr v2 benchmark testing out-of-domain decision making (compliance, triage, legal, DevOps, linguistics, safety).
  2. Real-Time Interactive Robotics/Gaming: The standard 8-seed ViZDoom evaluation protocol testing sub-20ms real-time control (aiming, centering, firing) purely zero-shot from structured scene text.
Model / Architecture Model Size v2 Macro Acc (49 Tasks) Choice Macro (20 Tasks) ViZDoom Kills (Defend Center) GPU Latency Hosting / Cost
TypeSafe Jev (typesafe/jev-1.13) Proprietary MoE 96.6% 96.8% 5.62 kills ~115 ms (API) Cloud Only ($0.042/1M tokens)
Von 1.1 (Current) 395M params (1.5 GB) 72.0% 83.0% 9.00 kills ~18 ms Local / Free (Apache 2.0)
GLiNER2 (fastino/gliner2-large-v1) ~300M params 68.4% 76.2% N/A ~93 ms Local / Free (Apache 2.0)
Finetuned Qwen3.5 (4B Causal) 4B params ~63.5% 71.0% 3.62 kills ~144 ms Local / Open Weights

Von leads all open local System One models on the 49-task v2 suite at 72.0% macro / 72.4% micro (Choice routing at 83.0%, with symptom triage at 100.0%, home services at 95.7%, and city routing at 94.7%), while outperforming closed-source Jev by +60.1% on real-time ViZDoom arena combat (9.00 vs 5.62 kills).


Zero-Shot ViZDoom Real-Time Gameplay Evaluation

Following the standard evaluation protocol from independent benchmarking and TypeSafe's Doom demonstrations, models are evaluated controlling real-time gameplay in ViZDoom purely zero-shot from structured semantic scene observations.

The evaluation benchmarks the model across two standard tasks across eight shared fresh seeds each:

  1. Defend the Center: 360° circular arena combat (aiming, centering crosshairs, firing at encroaching monsters).
  2. Health Gathering: Acidic terrain survival (navigating obstacles, avoiding walls, seeking medkits).
Model / Controller Model Architecture Defend Kills (Mean across 8 seeds) Health Survival (Mean across 8 seeds) Execution
Von 1.1 (Zero-Shot) 395M Bidirectional ModernBERT 9.00 kills 12.11 s Local In-Process (Sub-18ms)
TypeSafe Jev 1.13 API Proprietary Hosted Decision Model 5.62 kills 13.03 s Cloud Hosted (~115ms)
Finetuned Qwen3.5 4B 4B Causal Decoder 3.62 kills 11.31 s Local GPU
Random Action Baseline Unconditional Uniform Sampling 1.88 kills 15.77 s Scripted
Finetuned ModernCE 149M ModernBERT-Base NLI 1.25 kills 11.66 s Local GPU

Von achieves 9.00 average kills in Defend the Center, outperforming TypeSafe's proprietary Jev 1.13 (+60.1% more kills) and all open models, while running locally with sub-18ms inference latency.

To reproduce the benchmark:

uv run python benchmarks/run_doom_benchmark.py

The Decision Primitives

Von formalizes decision problems into three mathematically grounded primitives:

1. Choice: Categorical Decision

Computes a normalized probability distribution over a set of $K$ mutually exclusive candidate hypotheses ${c_1, c_2, \dots, c_K}$:

$$P(c_k \mid S, Q) = \frac{\exp(z_k / T)}{\sum_{j=1}^K \exp(z_j / T)}$$

Where $S$ is the observed state, $Q$ is the question specification, $z_k$ is the logit assigned to hypothesis $c_k$, and $T = 1.1692$ is the calibration temperature. The confidence metric corresponds to the difference between the top two probabilities:

$$\text{Confidence} = P(c_{(1)}) - P(c_{(2)})$$

2. Noul: Binary Probability Verification

Estimates the calibrated posterior probability that a specific condition holds true given the evidence:

$$P(y = 1 \mid S, Q) \in [0.0, 1.0]$$

Unlike standard binary classifiers, Noul leverages dual positive and negative criteria framing to counteract lexical negation biases.

3. Score: Ordinal Continuous Rating

Computes the expected value across an ordered sequence of severity or quality levels ${0, 1, \dots, K-1}$:

$$\mathbb{E}[L \mid S, Q] = \sum_{l=0}^{K-1} l \cdot P(l \mid S, Q)$$

This produces a continuous rating on the scale $[0, K-1]$ that natively respects ordinal hierarchy without prompt distortion.


Training Methodology & Calibration

Von-1.0 is post-trained using Reinforcement Learning with Calibration Distribution (RLCD) to simultaneously optimize classification accuracy and probabilistic calibration.

1. Dual Objective Loss

Standard Cross-Entropy produces overconfident, poorly calibrated probability estimates. Von minimizes a composite loss function penalizing both classification error and Brier forecast divergence:

$$\mathcal{L}{\text{RLCD}} = \mathcal{L}{\text{CE}} + \lambda \mathcal{L}_{\text{Brier}}$$

Where $\lambda = 0.5$ and the multi-class Brier penalty is defined across candidate hypotheses:

$$\mathcal{L}{\text{Brier}} = \sum{k=1}^K \left( P(c_k \mid S, Q) - \mathbf{1}[y = k] \right)^2$$

2. Balanced Adversarial Corpus

The training dataset consists of 250,000 class-balanced examples curated from human-and-model-in-the-loop adversarial reasoning benchmarks:

3. Temperature Scaling

Post-training calibration is achieved by fitting an empirical temperature scalar $T$ on held-out validation logits via bounded negative log-likelihood minimization:

$$\min_T -\sum_{i=1}^N \log \left( \frac{\exp(z_{i, y_i} / T)}{\sum_j \exp(z_{i, j} / T)} \right)$$

Optimization converged at $T = 1.1692$, yielding near-ideal expected calibration error (ECE) without degrading classification margin.


Installation

Python

pip install von-sdk
# or with uv
uv add von-sdk

# or directly from GitHub:
pip install git+https://github.com/wfzyx/von.git

TypeScript / JavaScript (Node.js & Bun)

bun add von-sdk
# or npm install von-sdk

Python API Usage

1. Discrete Decision (von.decide)

import von

result = von.decide(
    state="Database replication lag on cluster us-west-2 exceeded 45 seconds.",
    choices={
        "infrastructure": "Database, hardware, network, or server failures",
        "billing": "Invoices, payments, refunds, subscription queries",
        "feature_request": "Requests for new platform capabilities",
    },
    instructions="Classify the root cause domain of this incident.",
)

print(result.choice)         # 'infrastructure'
print(result.confidence)     # 0.8412
print(result.probabilities)  # {'infrastructure': 0.9021, 'billing': 0.0489, ...}

2. Probabilistic Condition Verification (von.judge)

import von

p_blocking = von.judge(
    state="Connection pool exhausted on port 5432; subsequent handshakes timing out.",
    instructions="Is this issue actively blocking customer operations?",
)

print(p_blocking)  # 0.9412
if p_blocking > 0.8:
    trigger_incident_response()

3. Continuous Scale Rating (von.rate)

import von

rating = von.rate(
    state="Memory utilization reached 98% with frequent OOM killer invocations.",
    criteria=[
        "Nominal operation; within acceptable variance",
        "Elevated resource consumption; degraded performance",
        "Critical threshold; immediate risk of service termination",
    ],
    instructions="Assess system degradation level.",
)

print(rating.score)       # 1.89 (scale 0.0 to 2.0)
print(rating.confidence)  # 0.78

4. Speculative Multi-Question Fan-Out (von.system_one)

Evaluate multiple heterogeneous questions in a single forward pass without latency multiplication:

import von

state = {
    "ticket_id": "INC-4091",
    "customer_tier": "enterprise",
    "message": "Payment gateway reports timeout on charge authorizations. Urgent.",
}

questions = {
    "intent": von.choice(
        instructions="What is the operational nature of this ticket?",
        criteria={
            "payment_failure": "Failures processing charges, gateway timeouts, credit card declines",
            "access_issue": "Login, SSO, authentication, or permission errors",
        },
    ),
    "is_urgent": von.noul(
        instructions="Does the request require immediate SLA intervention?",
    ),
    "severity": von.score(
        instructions="Rate the incident severity.",
        criteria=["Low", "Medium", "High", "Critical"],
    ),
}

resp = von.system_one(state=state, questions=questions)

print(resp.answers["intent"].choice)     # 'payment_failure'
print(resp.answers["is_urgent"].noul)    # 0.9204
print(resp.answers["severity"].score)    # 2.81

TypeScript / Node.js Usage

import { VonClient, choice, noul, score } from "von-sdk";

const client = new VonClient({ baseURL: "http://localhost:8000" });

const { answers } = await client.systemOne({
  state: { ticket: "Export button crashes settings page on Safari 17.2" },
  questions: {
    department: choice("Which team should handle this?", {
      frontend: "UI, client-side scripts, browser compatibility",
      billing: "Invoices, subscriptions, refunds",
    }),
    isUrgent: noul("Does this communicate production impact?"),
    severity: score("Rate bug impact", ["Minor", "Moderate", "Critical"]),
  },
});

console.log(answers.department.choice);     // "frontend"
console.log(answers.department.confidence); // 0.89
console.log(answers.isUrgent.noul);         // 0.12

Production Workflow Presets

Pre-packaged decision suites for high-frequency operational pipelines (von.presets):

import von
from von.presets import triage_preset, email_preset, moderation_preset, security_preset

# Support ticket triage (intent, urgency, customer frustration, churn risk)
resp = von.system_one(state=customer_payload, questions=triage_preset())

# Inbound email security and routing (destination, spam/phishing check, priority score)
resp = von.system_one(state=raw_email_body, questions=email_preset())

# Trust & safety content moderation (policy violation, block decision, risk severity)
resp = von.system_one(state=user_submitted_content, questions=moderation_preset())

# Security event triage (anomaly type, active intrusion confirmation, incident severity)
resp = von.system_one(state=audit_log_telemetry, questions=security_preset())

Composable Decision Patterns

High-level architectural patterns for agentic pipelines (von.patterns):

from von.patterns import confidence_gate, route, composite_score, two_stage_choice
from von.types import Choice

# 1. Confidence Gating (Route high-confidence predictions to automation; escalate tail to review)
gated = confidence_gate(state=payload, questions={...}, threshold=0.85)
# Output: {"automatic": {...}, "escalate": {...}}

# 2. Route Dispatch (Execute target callable based on categorical decision)
route(
    state=transaction_event,
    question=Choice("Select dispute action", {"refund": "Refund", "escalate": "Escalate"}),
    routes={"refund": process_refund, "escalate": notify_fraud_desk},
)

# 3. Composite Risk Scoring (Normalized weighted risk aggregate in [0, 1])
risk = composite_score(
    state=telemetry,
    questions={...},
    weights={"severity": 2.0, "is_threat": 3.0},
)
print(risk["score"])  # e.g. 0.9124

# 4. Two-Stage Routing (Handles high-cardinality taxonomies >25 options in sub-50ms)
taxonomy = {
    "cloud": {"aws": "Amazon Web Services", "gcp": "Google Cloud", "azure": "Microsoft Azure"},
    "database": {"postgres": "PostgreSQL", "mysql": "MySQL", "redis": "Redis"},
}
decision = two_stage_choice(state="Postgres replica lag exceeded limit", taxonomy=taxonomy)

Server Deployment (von serve)

Start the production-ready HTTP server compatible with the /v1/systemone specification:

# Launch server on port 8000
von serve --host 0.0.0.0 --port 8000

Wire Protocol Verification

curl -X POST http://localhost:8000/v1/systemone \
  -H "Content-Type: application/json" \
  -d '{
    "model": "von-1.1.0",
    "state": { "error": "Disk volume /var/log at 98% capacity." },
    "questions": {
      "requires_intervention": {
        "type": "noul",
        "instructions": "Does this disk space condition require operational intervention?"
      }
    }
  }'

Training Data & Domain Coverage

Von is built on ModernBERT-Large (395M parameters, pretrained on 2 trillion tokens of general web text, technical literature, and code) and fine-tuned for high-speed, non-autoregressive decision making.

Fine-Tuning Corpus Composition

The decision-scoring head and representation space are fine-tuned across a ~290,000-example balanced multi-domain corpus:

Domain Cluster Share Representative Tasks & Coverage
Operational & Enterprise Workflow ~25% IT support ticket triage, customer intent routing (Banking77), billing/refund dispute policies, warranty verification, e-commerce order exceptions.
Security, DevOps & Compliance ~20% Credential & secret leak detection, SQL injection / payload screening, phishing analysis, commit intent classification, on-call alert routing, PII detection.
Safety, Policy & Moderation ~15% Ad policy violations, Fair Housing Act compliance, travel expense policy limits, Terms of Service gating.
Linguistic & Content Semantics ~15% Formality grading, grammar error taxonomies (spelling, syntax, agreement), sentiment analysis, reading level estimation.
Triage & Services ~10% Clinical/symptom urgency triage, veterinary severity scoring, municipal 311 service routing, dietary restriction & allergen verification.
Adversarial Reasoning Anchor ~15% Multi-task NLI reasoning (ANLI Rounds 1–3, WANLI) retained to anchor logical entailment and prevent catastrophic forgetting of general world logic.

Domain Generalization & Out-of-Domain Tasks (e.g. Education, Academia)


Theoretical Homage

Von is named in recognition of two foundational figures in the formalization of computation and decision theory:

  1. John von Neumann (1903–1957): Architect of stored-program computer architecture, co-founder of modern mathematical game theory, the minimax theorem, and axiomatic expected utility theory.
  2. Ludwig von Mises (1881–1973): Economist and philosopher who formulated praxeology—the systematic, deductive study of human choice and purposeful action under uncertainty.

Academic References

If utilizing Von in research or enterprise systems, please cite the underlying methodologies:

@article{von2026systemone,
  title={Von: Non-Autoregressive System One Decision Modeling via Calibrated Bidirectional Representations},
  author={Panisa, Victor},
  year={2026},
  url={https://github.com/wfzyx/von}
}

@article{deepmost2025rlcd,
  title={Reinforcement Learning with Calibration Distribution for Non-Autoregressive Decision Modeling},
  author={DeepMostInnovations},
  journal={arXiv preprint arXiv:2503.23303},
  year={2025}
}

@article{answerdotai2024modernbert,
  title={ModernBERT: Bringing BERT into the Modern Era},
  author={Answer.AI and LightOn},
  year={2024},
  url={https://huggingface.co/blog/modernbert}
}

License

Apache-2.0. Open-source for academic, personal, and commercial deployment.

von (wfzyx/von)

Searching Database…

916 ·GitHub
archived
这是什么?Von 是一个开源的非自回归决策模型(3.95 亿参数,1.5 GB),只需一次前向传播、不到 25 毫秒,就能给出校准过的离散、概率和序数决策——它是专有的 TypeSafe Jev 的本地免费替代品。
它是我导入的库、我下载的模型,还是我自己运行的服务?三者都是:它以 Python 和 TypeScript/JavaScript 库的形式发布,围绕预训练的 von-1.1 权重,可以完全在进程内运行,也可以通过 'von serve' 提供 HTTP 服务——与 TypeSafe /v1/systemone 规范完全兼容。
我怎么把它跑起来?安装 Python 包,或适用于 Node.js 和 Bun 的 TypeScript/JavaScript 客户端;然后在进程内调用模型,或用 'von serve' 启动生产级 HTTP 服务器,它使用 /v1/systemone 协议。
说实话,它和 TypeSafe Jev 比怎么样?Jev 在通用推理上仍然更强(在 49 项任务的 jabr v2 测试套件上宏平均 96.6% 对 72.0%),但在实时控制上 Von 更胜一筹——在 ViZDoom 中击杀数 9.00 对 5.62——而且它在本地约 18 毫秒内运行,而不是一次约 115 毫秒的云端 API 调用。
它真的能玩 Doom 吗?能,而且是零样本:同一套随附的 von-1.1 权重驱动一个 ViZDoom 游戏循环,每一个移动决策——前进、后退、闪避火球——都是一次前向传播,把六个选项描述与深度缓冲区的文本渲染进行比对打分。在单块 T4 上 80 秒内击杀 33 次,没有经过任何微调或强化学习。
除了基础的 decide/judge/rate 调用,还有别的吗?有——von.presets 为高频运营流水线提供了打包好的决策套件,von.patterns 为智能体流水线提供可组合的架构模式,von.systemone 则能在一次前向传播中评估多个异构问题,而不会让延迟成倍增加。
为什么叫 Von?它是为了致敬 John von Neumann(存储程序架构、博弈论、极小极大、期望效用)和 Ludwig von Mises(行为学——对不确定性下人类选择的演绎研究)。
Creator
wfzyx
Size
28.9 MB
Stars
916
Age
30d
Commits · 90 Days