Instructions to use Ethan33X/Tractus-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ethan33X/Tractus-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ethan33X/Tractus-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ethan33X/Tractus-4B") model = AutoModelForCausalLM.from_pretrained("Ethan33X/Tractus-4B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ethan33X/Tractus-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ethan33X/Tractus-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ethan33X/Tractus-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ethan33X/Tractus-4B
- SGLang
How to use Ethan33X/Tractus-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ethan33X/Tractus-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ethan33X/Tractus-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ethan33X/Tractus-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ethan33X/Tractus-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ethan33X/Tractus-4B with Docker Model Runner:
docker model run hf.co/Ethan33X/Tractus-4B
- Tractus-4B
- Tractus vs. Frontier Commercial APIs & Qwen3.5 (At a Glance)
- Highlights
- 1. Model Details
- 2. Evaluation
- 3. Interactive Production Demos (4 Real-World Applications)
- 3.1 Demo 1: Autonomous Web Navigation Agent (
demos/run_demo1_web_agent.py&/demo1) - 3.2 Demo 2: Full-Duplex Meeting Sentinel (
demos/run_demo2_meeting_sentinel.py&/demo2) - 3.3 Demo 3: Multi-Intent Banking & Service Router (
demos/run_demo3_service_router.py&/demo3) - 3.4 Demo 4: Real-Time 22-Agent Spatial Dynamics — JevBall (
demos/run_demo4_spatial_dynamics.py&/demo4) - 3.5 Running the Demos Locally
- 3.1 Demo 1: Autonomous Web Navigation Agent (
- 4. Quickstart & Usage (Pure System 1, Joint Dual-Mode, and GO)
- 5. License
- 6. Citation
Tractus-4B
Tractus-4B is a 4.21B-parameter dual-mode decision model post-trained from Qwen/Qwen3.5-4B-Base. It pairs System 1 single-pass option scoring (0 generated tokens) with System 2 adaptive deliberation (quickstart_dual_mode.py) on the shared in-place KV cache, unlocking emergent multi-step reasoning (+12.12 pp on JevBench-231 with 43.7% single-pass exits and -12.7% fewer tokens than unconstrained CoT, and +7.51 pp Pooled 9-Task accuracy across 9 benchmarks).
Tractus vs. Frontier Commercial APIs & Qwen3.5 (At a Glance)
Flagship (9B) vs. Commercial APIs & Official Qwen3.5 Baselines (831-Task Suite + Matched-GPU Latency)
Evaluated on the 831-item Exploratory Commercial Suite (JevBench-231 + 6 x 100 shared tasks) at 262,144-token context (BF16, single-order prefill, raw Thermostasis ECE with zero validation-fitted temperature scalars; System 2 max_new_tokens=8192). Tractus-9B (GO) uses Gap-Only routing (escalating iff $\Delta z \le e$). Official Qwen3.5 baselines run on the exact same 831 items (single official prompt, matched single-GPU BF16), whereas Tractus selects the best of 3 prompt templates per task; external commercial API columns cite DataCamp's published full-split reference scores:
Benchmark (Split / Metric) |
Tractus-decision-9B |
Tractus-9B (Dual) |
Tractus-9B (GO) |
Qwen3.5-9B (Think) |
Qwen3.5-4B (Think) |
Gemini Decision 1 | TypeSafe Jev 1.14 | GPT-6 Luna (Decisions API) | Gemini 3.5 Flash-Lite (minimal) |
|---|---|---|---|---|---|---|---|---|---|
JevBench (Public / 231) |
80.52% | 88.74% | 92.21% | 93.07% | 89.18% | 92.2% | 90.0% | 90.9% | 86.6% |
Amazon ESCI (Macro-F1, n=100) |
63.12% | 59.23% | 55.75% | 65.23% | 62.69% | 58.7% | 56.7% | 54.7% | 47.2% |
New Yorker Caption (n=100) |
78.00% | 65.00% | 64.00% | 68.00% | 66.00% | 79.7% | 72.0% | 68.4% | 73.7% |
Mind2Web Multimodal (n=100) |
88.00% | 85.00% | 85.00% | 79.00% | 78.00% | 86.2% | 86.8% | 81.8% | 78.0% |
PubMedQA (n=100) |
76.00% | 70.00% | 65.00% | 74.00% | 70.00% | 79.8% | 78.2% | 74.4% | 77.6% |
Global-MMLU-Lite (12 Non-EN, n=100) |
67.00% | 77.00% | 79.00% | 72.00% | 71.00% | 86.0% | 85.0% | 79.6% | 78.8% |
When2Call (n=100) |
75.00% | 84.00% | 84.00% | 84.00% | 81.00% | 79.9% | 82.0% | 70.4% | 60.9% |
Pooled Top-1 ECE (7 shared evals, ↓) |
0.0245 | 0.0528 | 0.0280 | — | — | 0.0250 | 0.0494 | 0.0721 | 0.2104 |
| Parse Fail / S2 Esc. or Mean Tok | 0 / 0 | 0 / 352* | 0 / 480* | 44 / 2,925 | 65 / 2,925 | — | — | — | — |
Seq. Med. Lat (batch=1, Matched GPU, ↓) |
47.4 ms (0.14 s 3-tpl) | 0.69 s | 7.22 s | 26.00 s | 14.36 s | — | — | — | — |
*Tractus-decision-9B resolves all 831 items in 0 generated tokens (47.4 ms 1-prompt / 0.14 s 3-prompt median, 0 parse failures); Tractus-9B (Dual) resolves 479/831 items without decoding (352 escalated, 4 Ratchet rescues, 0.69 s median, 0 parse failures) vs. 26.00 s (2,925 mean tokens, 44 parse failures) for Qwen3.5-9B (Think); Tractus-9B (GO) reaches 92.21% JevBench at 7.22 s median (480 escalated, 4 Ratchet rescues, 0 parse failures). Pooled Top-1 ECE uses DataCamp's 10-bin convention with raw unfitted Thermostasis (optional 5-fold OOF temperature scaling: 9B Dual 0.0836, 9B GO 0.0269, 9B dec. 0.0395, 4B Dual 0.0107, 4B dec. 0.0145, 2B dec. 0.0197).
Unified-Prompt Full-Split Comparison (9B & 4B) vs. Commercial APIs (7 Shared Core Benchmarks, N=7,235)
Single unified chat_template prompt (no multi-prompt selection, zero OOF calibration fitting) across all 7 full-split shared benchmarks vs. published DataCamp commercial API full-split scores:
Benchmark (Split / Metric) |
Tractus-9B (Dual) |
Tractus-decision-9B |
Tractus-4B (Dual) |
Tractus-decision-4B |
Gemini Decision 1 | TypeSafe Jev 1.14 | GPT-6 Luna (Decisions API) | Gemini 3.5 Flash-Lite (minimal) |
|---|---|---|---|---|---|---|---|---|
JevBench (Public / 231) |
90.91% | 79.22% | 88.31% | 76.19% | 92.2% | 90.0% | 90.9% | 86.6% |
Amazon ESCI (Macro-F1, n=2,000) |
46.26% | 37.68% | 46.39% | 41.07% | 58.7% | 56.7% | 54.7% | 47.2% |
New Yorker Caption (Text-only, n=528) |
67.05% | 65.72% | 52.65% | 49.43% | 79.7% | 72.0% | 68.4% | 73.7% |
Mind2Web Multimodal (n=276) |
87.32% | 86.23% | 84.78% | 86.96% | 86.2% | 86.8% | 81.8% | 78.0% |
PubMedQA (n=1,000) |
73.30% | 75.60% | 69.00% | 69.20% | 79.8% | 78.2% | 74.4% | 77.6% |
Global-MMLU-Lite (12 Non-EN, n=1,200*) |
81.67% | 73.50% | 77.33% | 67.08% | 86.0% | 85.0% | 79.6% | 78.8% |
When2Call (n=2,000) |
82.20% | 76.05% | 80.30% | 65.20% | 79.9% | 82.0% | 70.4% | 60.9% |
Top-1 ECE (7 shared evals, ↓) |
0.2228 | 0.0889 | 0.2609 | 0.1068 | 0.0250 | 0.0494 | 0.0721 | 0.2104 |
*Full-split ECE above uses 15-bin sample-weighted raw Thermostasis over N=7,235 items (JevBench-231 dual-mode ECE is 0.0678 at 9B and 0.0767 at 4B); unit-temperature softcapping (T=1) achieves lower OOD 15-bin wECE (0.0616 at 9B, 0.0663 at 4B; see arXiv:2611.40633 Table 3b).
Highlights
- Zero-Decode-Latency Single-Pass Decisions (
0Generated Tokens): Avoids multi-token decoding latency by reading the input state and2–255candidate options in one prefill pass with0generated tokens and a 99.9% smaller readout projection (skipping the248,320-way vocabulary head), scoring keys at the terminal position via Thermostasis (optional Binary Prior Shift -> $\tanh$ logit softcappingC = 30.0-> zero-sum centering -> analytic 2D $e$-Thermostat with zero validation-fitted temperature scalars; the two optional static binary priors+3.2hallucination on RAGTruth and-0.75phishing on PhishNChips trigger only in Decision Index 0.3 and are0on all 9 primary benchmarks and OOD19,887). - Multimodal
Qwen3.5Hybrid Backbone (256KContext,4×KV Cut & Zero Re-Prefill): Built on theQwen3.53:1hybrid Gated DeltaNet + Gated Attention vision-language architecture (262,144-token context), cutting BF16 KV-cache memory 4× at256K(34.36 GB -> 8.59 GB) and reusing 100% of the live prefill KV prefix with zero re-prefill when escalating to System 2, across text, structured JSON ledgers, UI layouts, and spatial states. - Measured Public Benchmark Performance: Scores 41.31 Balanced Skill (55.56% raw accuracy) on Decision Index 0.3, 204 / 231 (88.31%) on JevBench 231 (
Tractusdual-mode,8K:48/48Easy,69/72Standard,87/111Hard; 76.19% single-passTractus-decision), and 72.08% Pooled 9-Task accuracy (+7.51 ppover single-pass); on the 831-item Exploratory Commercial Suite (256K, single-order prefill),Tractus-4Breaches 89.61% JevBench (207/231), 83.00% Mind2Web, 80.00% When2Call, and 4.99% raw (1.07% OOF) Pooled ECE (Tractus-decision-4Bleads 67.10% Amazon ESCI at 2.46% raw / 1.45% OOF Pooled ECE). - 4 End-to-End Real-World Demos: Ships with 4 interactive applications (Web Navigation, Full-Duplex Meeting Sentinel, Multi-Intent Banking & Service Router, and
JevBall22-Agent Spatial Dynamics under a300 msSLA) running live on Apple Silicon Metal GPU (MLX INT4) and CUDA/PyTorch (BF16).
1. Model Details
| Property | Specification |
|---|---|
| Model ID | Ethan33X/Tractus-4B |
| Base Model | Qwen/Qwen3.5-4B-Base (Unified Vision-Language Foundation) |
| Parameters | 4.21B total (3.57B non-embedding backbone) |
| Architecture | Hybrid Qwen3.5: 32 (24 Gated DeltaNet + 8 Gated Attention) |
| Hidden / FFN Dimension | 2,560 / 9,216 |
| Vocabulary Size | 248,320 |
| Native Context Length | 262,144 tokens (256K) |
| Inputs | State (text, structured JSON/tables, or multimodal context) + candidate options |
| Outputs | Calibrated option probabilities (0 tokens in System 1) or adaptive System 2 reasoning + final answer |
| Memory Footprint | BF16 (8.4 GB) / INT4 (2.2 GB) |
| License | Modified MIT License (Tractus Commercial/MaaS Tiers; Qwen3.5 Apache-2.0 Notice) |
Tractus Model Lineup
| Scale | Single-Pass Decision Model (System 1) |
Dual-Mode Model (System 1 + System 2) |
Total / Backbone Params | Layers (DeltaNet + Attn) |
Hidden / FFN Dim | Context Window |
|---|---|---|---|---|---|---|
| 0.8B | Ethan33X/Tractus-decision-0.8B |
Ethan33X/Tractus-0.8B |
0.82B / 0.58B | 24 (18 + 6) |
1,024 / 3,584 | 262,144 |
| 2B | Ethan33X/Tractus-decision-2B |
Ethan33X/Tractus-2B |
1.88B / 1.48B | 24 (18 + 6) |
2,048 / 6,144 | 262,144 |
| 4B | Ethan33X/Tractus-decision-4B |
Ethan33X/Tractus-4B |
4.21B / 3.57B | 32 (24 + 8) |
2,560 / 9,216 | 262,144 |
| 9B | Ethan33X/Tractus-decision-9B |
Ethan33X/Tractus-9B |
9.24B / 8.12B | 32 (24 + 8) |
4,096 / 12,288 | 262,144 |
2. Evaluation
2.1 Decision Index 0.3
The Decision Index 0.3 suite evaluates chance-corrected decision skill $S = \frac{\text{score} - \text{chance}}{1 - \text{chance}} \times 100$ across 37 indexed benchmarks in five capability areas (Knowledge & Reasoning 25.8%, Language Understanding 25.8%, Retrieval & Classification 20.0%, Tools & Automation 18.3%, and Arts & Human Taste 10.0%).
Overall & Area Scores (Compared with Public Leaderboard Models by Scale)
| Model | Params | Balanced Skill | Balanced Raw | Breadth Skill | Tools & Auto | Language | Retrieval | Knowledge | Arts & Taste | Gen. Tokens |
|---|---|---|---|---|---|---|---|---|---|---|
Tractus-decision-9B |
9.24B | 46.03 | 59.32% | 44.71 | 58.15 (62.03%) | 60.40 (73.21%) | 37.44 (54.77%) | 31.71 (47.33%) | 40.95 (58.53%) | 0 |
| vLLM-SR Decision 2.0 Lux 9B | 9.65B | 45.97 | 59.93% | 45.87 | — | — | — | — | — | — |
| JevK5 9B v0.3.3 | 9.65B | 44.89 | 60.38% | 46.33 | — | — | — | — | — | — |
| Cloudflare clef-flash | 9.65B | 44.43 | 66.53% | — | — | — | — | — | — | — |
| JPT-9B | 9.65B | 44.08 | 59.66% | 45.16 | — | — | — | — | — | — |
| JEV-9B | 9.65B | 42.15 | 57.47% | 42.23 | — | — | — | — | — | — |
| Sieve 9B | 9.65B | 41.73 | 57.12% | 40.31 | — | — | — | — | — | — |
Tractus-decision-4B |
4.21B | 41.31 | 55.56% | 40.00 | 53.63 (58.81%) | 53.19 (67.67%) | 37.97 (53.24%) | 26.06 (44.01%) | 34.19 (52.87%) | 0 |
| vLLM-SR Decision 2.0 Nox 4B | 4.21B | 40.75 | 58.08% | — | — | — | — | — | — | — |
| Hopper (G) 1.2 (4B) | 4.66B | 40.17 | 56.00% | — | — | — | — | — | — | — |
| JPT-4B | 4.66B | 39.56 | 56.74% | — | — | — | — | — | — | — |
| Intern-Decision-4B | 4.66B | 38.69 | 53.59% | — | — | — | — | — | — | — |
| Decider 4B | 4.66B | 36.30 | 56.40% | — | — | — | — | — | — | — |
Tractus-decision-2B |
1.88B | 29.27 | 46.83% | 26.73 | 43.24 (49.01%) | 41.16 (59.31%) | 31.79 (49.65%) | 11.52 (33.10%) | 13.79 (40.48%) | 0 |
| this-that 1.2 (2B) | 1.88B | 24.85 | 45.76% | — | — | — | — | — | — | — |
| Decider 2B | 2.27B | 23.65 | 47.01% | — | — | — | — | — | — | — |
| vLLM-SR Decision 2.0 Sol 2B | 2.27B | 23.64 | 46.89% | — | — | — | — | — | — | — |
| Sieve 2B | 2.27B | 21.90 | 40.70% | — | — | — | — | — | — | — |
| Intern-Decision-2B | 2.27B | 20.93 | 37.89% | — | — | — | — | — | — | — |
Tractus-decision-0.8B |
0.82B | 18.07 | 37.66% | 17.10 | 23.84 (32.63%) | 27.65 (48.99%) | 15.26 (33.30%) | 10.45 (33.72%) | 8.10 (36.48%) | 0 |
| Bosun v3.1 1.7B | 1.72B | 16.54 | 41.06% | — | — | — | — | — | — | — |
| JPT-0.8B | 0.87B | 15.46 | 39.36% | — | — | — | — | — | — | — |
Selected Task Breakdown Across the Tractus Family (Task Score % / Skill)
| Capability Area | Benchmark | Metric | Tractus-decision-0.8B |
Tractus-decision-2B |
Tractus-decision-4B |
Tractus-decision-9B |
|---|---|---|---|---|---|---|
| Tools & Automation | BFCL | Case Exact Acc | 60.0% (46.1) | 81.7% (75.3) | 81.7% (75.3) | 90.0% (86.5) |
| Tools & Automation | ToolRet | nDCG@10 | 52.7% (44.8) | 60.2% (53.6) | 61.0% (54.5) | 65.0% (59.1) |
| Tools & Automation | API-Bank | Accuracy | 11.7% (10.0) | 38.3% (37.1) | 61.7% (60.9) | 60.0% (59.2) |
| Tools & Automation | When2Call MCQ | Accuracy | 37.5% (16.7) | 53.8% (38.3) | 61.3% (48.3) | 70.0% (60.0) |
| Tools & Automation | RouterBench | Selected Quality | 63.7% (15.0) | 77.1% (46.3) | 80.4% (54.1) | 80.8% (55.0) |
| Language Understanding | HellaSwag | Accuracy | 55.0% (40.0) | 80.0% (73.3) | 95.0% (93.3) | 92.5% (90.0) |
| Language Understanding | NLI4CT | Macro-F1 | 58.3% (18.9) | 82.2% (65.4) | 84.0% (68.9) | 89.6% (79.7) |
| Language Understanding | FinEntity | Macro-F1 | 64.5% (47.7) | 79.4% (69.7) | 78.4% (68.2) | 86.2% (79.7) |
| Language Understanding | ContractNLI | Macro-F1 | 71.9% (59.3) | 59.4% (41.3) | 71.1% (58.3) | 70.4% (57.2) |
| Language Understanding | ANLI | Macro-F1 | 54.4% (31.8) | 59.8% (39.8) | 64.6% (47.0) | 71.5% (57.4) |
| Language Understanding | iSarcasmEval | Macro-F1 | 33.3% (14.2) | 44.4% (28.5) | 75.0% (67.8) | 75.0% (67.8) |
| Retrieval & Class. | BANKING77 | Macro-F1 | 60.9% (60.4) | 54.7% (54.1) | 69.7% (69.3) | 65.2% (64.7) |
| Retrieval & Class. | CLINC150+OOS | Macro-F1 | 2.7% (2.1) | 58.4% (58.2) | 35.6% (35.2) | 64.4% (64.1) |
| Retrieval & Class. | BRIGHT | nDCG@10 | 10.4% (0.0) | 45.7% (37.7) | 42.3% (33.9) | 42.4% (34.0) |
| Knowledge & Reasoning | ARC-Easy | Accuracy | 72.5% (63.3) | 90.0% (86.7) | 100% (100) | 100% (100) |
| Knowledge & Reasoning | ARC-Challenge | Accuracy | 50.0% (33.3) | 77.5% (70.0) | 87.5% (83.3) | 95.0% (93.3) |
| Knowledge & Reasoning | MMLU | Accuracy | 30.0% (6.7) | 45.0% (26.7) | 75.0% (66.7) | 85.0% (80.0) |
| Knowledge & Reasoning | WinoGrande | Accuracy | 55.0% (10.0) | 50.0% (0.0) | 80.0% (60.0) | 85.0% (70.0) |
| Knowledge & Reasoning | MuSR | Accuracy | 55.0% (28.5) | 65.0% (44.4) | 65.0% (44.4) | 67.5% (48.3) |
| Knowledge & Reasoning | BBH (Fixed-Option) | Accuracy | 45.0% (20.3) | 44.0% (18.8) | 58.0% (39.1) | 67.0% (52.2) |
| Arts & Human Taste | BPoMP | Accuracy | 56.8% (13.6) | 41.1% (0.0) | 89.2% (78.5) | 94.6% (89.2) |
| Arts & Human Taste | New Yorker Captions | Accuracy | 20.0% (0.0) | 46.7% (33.3) | 48.3% (35.4) | 71.7% (64.6) |
| Arts & Human Taste | Humicroedit | Accuracy | 42.5% (0.0) | 42.5% (0.0) | 65.0% (30.0) | 70.0% (40.0) |
Full evaluation outputs (scores.json, index.json, benchmark-summary.json, environment.json, and results.jsonl.gz) for all four scales are archived in Ethan33X/tractus-decision-index-0.3.
2.2 JevBench 231 (Discrete Symbolic & Causal Logic — Unified chat_template)
Evaluated under the unified chat_template BF16 256K protocol (max_new_tokens=8192 for 2B/4B/9B dual-mode Tractus, HF 4096 for 0.8B) across Easy (48), Standard (72), and Hard (111) tiers:
| Model Pair | Params | Recommended Mode | Tractus-decision (Single-Pass, 231) |
Tractus (Dual-Mode, 231) |
E / S / H (Rec. Mode) |
Single-Pass Exits (Rec.) |
|---|---|---|---|---|---|---|
Tractus-9B / Tractus-decision-9B |
9.24B | Dual-Mode (Tractus, 8K) |
79.22% (183 / 231) | 90.91% (210 / 231) | 48/48 | 72/72 | 90/111 | 71.0% |
Tractus-4B / Tractus-decision-4B |
4.21B | Dual-Mode (Tractus, 8K) |
76.19% (176 / 231) | 88.31% (204 / 231) | 48/48 | 69/72 | 87/111 | 43.7% |
Tractus-0.8B / Tractus-decision-0.8B |
0.82B | Single-Pass (Tractus-decision) |
72.73% (168 / 231) | 70.13% (162 / 231) | 48/48 | 66/72 | 54/111 | 100% |
Tractus-2B / Tractus-decision-2B |
1.88B | Single-Pass (Tractus-decision) |
69.26% (160 / 231) (161 in separate BF16 batching pass) | 65.37% (151 / 231) | 48/48 | 66/72 | 46/111 | 100% |
Note: Single-pass Tractus-decision applies Thermostasis (optional Binary Prior Shift -> $\tanh$ logit softcapping C = 30.0 -> zero-sum centering -> 2D analytic $e$-thermostat with zero validation-fitted temperature scalars; $\tanh$ softcapping drives $T=1$ outlier-logit ECE reduction while zero-sum centering removes common-mode offsets, and the two optional static binary priors +3.2 hallucination / -0.75 phishing trigger only on asymmetric K = 2 tasks in Decision Index 0.3, with z_0 = 0 on JevBench, all 9 primary benchmarks, and OOD 19,887) with 0 generated reasoning tokens (the 1-item difference at 2B, 160/231 vs 161/231, reflects a BF16 left-padding/batching boundary shift across evaluation runs rather than generation budget); Tractus pairs the same calibrated System 1 pass with a Joint Confidence-Margin Router (phase_zone == SYSTEM_2 and conf < 0.80) and Defensive Safety Ratchet (accepting $y^{\mathrm{S2}}$ iff $p_{y^{\mathrm{S2}}}^{\mathrm{S2}} \ge \max(0.4, 1/K)$).
2.3 Additional Multi-Scale & Multilingual Splits
Edge Tiers (2B & 0.8B) vs. Commercial APIs (Unified-Prompt Full Splits, N=7,235)
Benchmark (Split / Metric) |
Tractus-2B (Dual) |
Tractus-decision-2B |
Tractus-0.8B (Dual) |
Tractus-decision-0.8B |
Gemini Decision 1 | TypeSafe Jev 1.14 | GPT-6 Luna (Decisions API) | Gemini 3.5 Flash-Lite (minimal) |
|---|---|---|---|---|---|---|---|---|
JevBench (Public / 231) |
65.37% | 69.26% | 70.13% | 72.73% | 92.2% | 90.0% | 90.9% | 86.6% |
Amazon ESCI (Macro-F1, n=2,000) |
28.02% | 29.54% | 27.19% | 26.66% | 58.7% | 56.7% | 54.7% | 47.2% |
New Yorker Caption (Text-only, n=528) |
43.75% | 45.27% | 31.82% | 32.95% | 79.7% | 72.0% | 68.4% | 73.7% |
Mind2Web Multimodal (n=276) |
75.36% | 74.28% | 63.77% | 63.77% | 86.2% | 86.8% | 81.8% | 78.0% |
PubMedQA (n=1,000) |
67.60% | 72.20% | 67.80% | 67.50% | 79.8% | 78.2% | 74.4% | 77.6% |
Global-MMLU-Lite (12 Non-EN, n=1,200) |
49.00% | 48.42% | 38.92% | 39.92% | 86.0% | 85.0% | 79.6% | 78.8% |
When2Call (n=2,000) |
57.05% | 58.75% | 38.85% | 39.85% | 79.9% | 82.0% | 70.4% | 60.9% |
Top-1 ECE (7 shared evals, ↓) |
0.0747 | 0.0674 | 0.3080 | 0.2839 | 0.0250 | 0.0494 | 0.0721 | 0.2104 |
Multi-Scale Tractus Scaling (0.8B–9B, Single-Order, 831-Task Exploratory Suite)
Benchmark (Split / Metric) |
0.8B decision |
0.8B Dual |
2B decision |
2B Dual |
4B decision |
4B Dual |
9B decision |
9B Dual |
|---|---|---|---|---|---|---|---|---|
JevBench (Public / 231) |
73.59% | 72.29% | 71.43% | 68.83% | 77.49% | 89.61% | 80.52% | 88.74% |
Amazon ESCI (Macro-F1, n=100) |
32.96% | 28.96% | 51.57% | 48.06% | 67.10% | 51.95% | 63.12% | 59.23% |
New Yorker Caption (n=100) |
36.00% | 39.00% | 60.00% | 57.00% | 66.00% | 62.00% | 78.00% | 65.00% |
Mind2Web Multimodal (n=100) |
65.00% | 64.00% | 74.00% | 74.00% | 84.00% | 83.00% | 88.00% | 85.00% |
PubMedQA (n=100) |
65.00% | 67.00% | 68.00% | 66.00% | 70.00% | 62.00% | 76.00% | 70.00% |
Global-MMLU-Lite (12 Non-EN, n=100) |
50.00% | 50.00% | 49.00% | 49.00% | 60.00% | 71.00% | 67.00% | 77.00% |
When2Call (n=100) |
49.00% | 49.00% | 61.00% | 61.00% | 70.00% | 80.00% | 75.00% | 84.00% |
Pooled Top-1 ECE (7 shared evals, ↓) |
0.0239 | 0.0385 | 0.0274 | 0.0389 | 0.0246 | 0.0499 | 0.0245 | 0.0528 |
S2 Escalated (Ratchet Rescued) |
0 (0) |
327 (131) |
0 (0) |
559 (224) |
0 (0) |
614 (7) |
0 (0) |
352 (4) |
Global-MMLU-Lite Multilingual & Almanac Reference (Split-Separated)
Whereas DataCamp evaluates only the 12 Non-English slice (Gemini Decision 1: 86.0%, TypeSafe Jev 1.14: 85.0%), public leaderboards such as Benchmark Almanac report Global-MMLU-Lite Full (all 15 languages incl. English). Both Tractus's evaluated multilingual slices and the Almanac external models are reported cleanly in separate tables so splits are never conflated:
| Scale | Tractus (Dual, EN-400) |
Tractus-decision (EN-400) |
Tractus (Dual, 12 Non-EN) |
Tractus-decision (12 Non-EN) |
Tractus (Dual, 22 Non-EN) |
Tractus-decision (22 Non-EN) |
Tractus-decision (23-lang Full, n=9,200) |
|---|---|---|---|---|---|---|---|
| 9B | 85.75% | 82.25% | 81.67% | 73.50% | 79.00% | 66.86% | 67.77% |
| 4B | 82.75% | 79.25% | 77.33% | 67.08% | 72.55% | 60.14% | 61.40% |
| 2B | 59.00% | 60.00% | 49.00% | 48.42% | 43.59% | 43.77% | 44.48% |
| 0.8B | 47.50% | 49.00% | 38.92% | 39.92% | 39.14% | 38.23% | 38.15% |
External Reference (Benchmark Almanac Full, 15 langs incl. EN) |
GPT-6 Sol | GPT-6 Astra | GPT-6 Luna | Gemma 4 31B IT | Gemini 3.5 Flash-Lite | Gemma 4 26B A4B | DeepSeek-V3.1 | Gemma 3 (27B / 4B / 1B) |
|---|---|---|---|---|---|---|---|---|
| Full Score (15 langs incl. EN) | 94.1% | 92.6% | 92.0% | 90.7% | 89.5% | 85.7% | 80.4% | 76.3% / 65.1% / 34.2% |
2.4 Unified 9-Benchmark chat_template Suite (N=9,835 Items per Scale)
Benchmark / Summary (n) |
0.8B decision |
0.8B Tractus |
2B decision |
2B Tractus |
4B decision |
4B Tractus |
9B decision |
9B Tractus |
|---|---|---|---|---|---|---|---|---|
JevBench-231* (231, Top-1) |
72.73% | 70.13% | 69.26% | 65.37% | 76.19% | 88.31% | 79.22% | 90.91% |
Global-MMLU-EN (400) |
49.00% | 47.50% | 60.00% | 59.00% | 79.25% | 82.75% | 82.25% | 85.75% |
Global-MMLU-Lite (1,200) |
39.92% | 38.92% | 48.42% | 49.00% | 67.08% | 77.33% | 73.50% | 81.67% |
Global-MMLU-NonEN (2,200) |
38.23% | 39.14% | 43.77% | 43.59% | 60.14% | 72.55% | 66.86% | 79.00% |
When2Call (2,000) |
39.85% | 38.85% | 58.75% | 57.05% | 65.20% | 80.30% | 76.05% | 82.20% |
Amazon ESCI (2,000, Macro-F1) |
26.66% | 27.19% | 29.54% | 28.02% | 41.07% | 46.39% | 37.68% | 46.26% |
Amazon ESCI† (2,000, Top-1) |
52.00% | 48.25% | 55.75% | 52.05% | 61.60% | 61.10% | 60.50% | 62.45% |
Mind2Web (276) |
63.77% | 63.77% | 74.28% | 75.36% | 86.96% | 84.78% | 86.23% | 87.32% |
PubMedQA (1,000) |
67.50% | 67.80% | 72.20% | 67.60% | 69.20% | 69.00% | 75.60% | 73.30% |
New Yorker Caption (528) |
32.95% | 31.82% | 45.27% | 43.75% | 49.43% | 52.65% | 65.72% | 67.05% |
| 9-Task Macro Mean | 47.84% | 47.23% | 55.72% | 54.30% | 66.06% | 72.67% | 71.46% | 77.05% |
Pooled 9-Task Acc. (N=9,835 Top-1) |
46.22% | 45.19% | 54.91% | 53.19% | 64.57% | 72.08% | 70.53% | 76.18% |
*JevBench-231 uses 8192 tokens at 2B/4B/9B and HF 4096 at 0.8B; the remaining 8 tasks use 4096. †9-Task Macro Mean uses ESCI Macro-F1; Pooled 9-Task Acc. uses ESCI Top-1.
3. Interactive Production Demos (4 Real-World Applications)
The release repository includes 4 standalone interactive demos and a Unified Web Cockpit (demos/run_web_ui.py). All demos execute authentic neural forward passes on Apple Silicon Metal GPU (MLX INT4) or PyTorch (CUDA/MPS) with zero mock responses.
3.1 Demo 1: Autonomous Web Navigation Agent (demos/run_demo1_web_agent.py & /demo1)
- Scenarios: The Web UI & Playwright suite (
/demo1) navigates 4 interactive local web portals (Google Flights 10-flight matrix, Casa Flora property booking, MegaStore electronics checkout, Global Service 25+ country GDPR onboarding) plus 1 live public airline website (https://hk.trip.com/flights/), alongside causal refusal probes (impossible routeAtlantis->BLOCKEDat4B/9Bwith93.4%/77.7%confidence; conservativeWAITat0.8B/2B). Standalone CLI (demos/run_demo1_web_agent.py) runs the closed-loop multi-step enterprise travel form (MockWebApp). - Measured Edge Performance (MLX INT4,
bits=4, group_size=64, unquantizedlm_head, Zero Autoregressive Decoding):
| Model (MLX INT4) | Weight Disk Size | Scenarios Passed | Step Accuracy | Premature DONE Rate | Gen. Tokens / Step | Inference Path |
|---|---|---|---|---|---|---|
Tractus-0.8B-INT4 |
909 MB | 100% (5 / 5) | 100% (20 / 20) | 0% | 0 | 1 prefill pass |
Tractus-2B-INT4 |
1.0 GB | 100% (5 / 5) | 100% (20 / 20) | 0% | 0 | 1 prefill pass |
Tractus-4B-INT4 |
2.2 GB | 100% (5 / 5) | 100% (20 / 20) | 0% | 0 | 1 prefill pass |
Tractus-9B-INT4 |
6.1 GB | 100% (5 / 5) | 100% (20 / 20) | 0% | 0 | 1 prefill pass |
3.2 Demo 2: Full-Duplex Meeting Sentinel (demos/run_demo2_meeting_sentinel.py & /demo2)
- Environment: 4-speaker enterprise design & BOM budget review (Edinburgh AMI Meeting Corpus
IS1008d, 12 streamed ASR text transcript slices over63.6 s,3/12filler slices; Tractus operates on streamed ASR text transcripts rather than raw audio waveforms) synchronized with a live prototype BOM cost ledger (€12.50cap, OLED display trade-off,€50Mprofit target). - What It Does: Classifies each utterance slice in a single pass over
[FILLER, QUESTION, COMMAND, STATEMENT], driving stateful duplex actions[SILENT_OBSERVE, DISPATCH_TASK, SUPPLEMENT_TASK]. Avoids multi-token decoding latency by resolving each utterance slice in a single prefill pass with0generated tokens across all four scales (2B/4B/9Breliably detect minimal filler probes, whereas0.8Bis capacity-limited on short fillers).
3.3 Demo 3: Multi-Intent Banking & Service Router (demos/run_demo3_service_router.py & /demo3)
- Environment: Enterprise customer support workbench streaming ASR text transcripts from authentic PolyAI MINDS-14 complaint audio (
32.77 sfull track; audio playback is for demonstration while Tractus evaluates the streamed text transcripts) alongside a Customer 360 profile and a 3-row transaction ledger highlighting-$200.00(Unauthorized POS Charge,FLAGGED HIGH-RISK). - What It Does: Replaces
50–85 smulti-layer IVR dial trees with 4 binary risk/escalation passes (Billing Dispute,Handoff Demand,Regulatory/Legal Threat,Emotional Distress) plus primary banking-intent routing (Emergency Card Freeze,Direct Debit,Billing Inquiry,Account Issue). Executes all 4 binary risk heads and primary intent routing via single-pass prefill with0generated tokens per pass, avoiding autoregressive CoT bottlenecks and JSON parse failures.
3.4 Demo 4: Real-Time 22-Agent Spatial Dynamics — JevBall (demos/run_demo4_spatial_dynamics.py & /demo4)
- Environment: Real-time 22-agent
105m x 68mtactical football pitch simulation (JevBall) enforcing a300.0 msper-tick carrier SLA deadline (contrasted against a366.0 mscloud API baseline). - What It Does: Evaluates 22-agent coordinates, tackle threat ETA, passing-lane clearance, offside margin, and
xGat each tick, scoring up to 14 typed tactical candidates (PASS,SHOT,DRIBBLEmaneuvers such as through balls, passes to feet, lateral safe backpasses, clinical/curled shots, and solo dribbles). Scores all 14 tactical candidates in a single prefill pass with0generated tokens per simulation tick, achieving0%SLA deadline misses under the300.0 msper-tick carrier budget on edgeTractus-0.8BMLX INT4 without autoregressive decoding delay.
3.5 Running the Demos Locally
# Launch the unified web cockpit (Web UI & Demos 1–3 support --engine mlx or pytorch; --model-size 0.8b/2b/4b/9b)
python demos/run_web_ui.py --engine mlx --model-size 4b --port 8080
# Or run individual standalone demos:
python demos/run_demo1_web_agent.py --engine mlx --model-size 4b --max-steps 25
python demos/run_demo2_meeting_sentinel.py --engine mlx --model-size 4b
python demos/run_demo3_service_router.py --engine mlx --model-size 4b
# Demo 4 accepts --engine mlx (Metal GPU) or --engine unified (PyTorch CUDA/MPS/CPU)
python demos/run_demo4_spatial_dynamics.py --mode match --engine mlx --model-size 4b
4. Quickstart & Usage (Pure System 1, Joint Dual-Mode, and GO)
4.1 Pure System 1 Single-Pass Scoring (Tractus-decision, standalone transformers)
git clone https://github.com/XieShaocong33Ethan/Tractus.git && cd Tractus
python quickstart.py --model Ethan33X/Tractus-decision-4B
# Requires: pip install torch transformers
import math
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "Ethan33X/Tractus-4B"
device = "cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu")
dtype = torch.bfloat16 if device == "cuda" else torch.float32
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, dtype=dtype).to(device).eval()
state = "My integration keeps failing with a 401 error since we rotated our API key this morning."
question = "Which support queue should handle this request?"
options = {
"A": "Billing and subscription invoices",
"B": "Technical API authentication support",
"C": "New enterprise sales inquiries",
"D": "Account closure and retention",
}
messages = [
{"role": "system", "content": "You are a decision engine. Read the state, then answer the question by replying with exactly one option key from the list. Do not explain."},
{"role": "user", "content": f"State:\n{state}\n\nQuestion:\n{question}\n\nOptions:\n" + "\n".join(f"{k}: {v}" for k, v in options.items()) + "\n\nReply with exactly one option key."},
]
try:
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
except TypeError:
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
keys = list(options)
key_ids = []
for k in keys:
ids = tokenizer.encode(k, add_special_tokens=False)
if len(ids) != 1:
raise ValueError(f"Option key {k!r} must map to a single token, got {ids}.")
key_ids.append(ids[0])
if len(set(key_ids)) != len(key_ids):
raise ValueError("Option keys must map to distinct token IDs.")
with torch.inference_mode():
terminal_logits = model(input_ids=inputs["input_ids"], logits_to_keep=1).logits[0, -1]
# Thermostasis: Optional Binary Prior Shift (z_0=0 here) -> Softcap (C=30.0) -> Zero-Sum Centering -> 2D Analytic e-Thermostat
capped = [30.0 * math.tanh(terminal_logits[tid].item() / 30.0) for tid in key_ids]
mean_z = sum(capped) / len(capped)
centered = [v - mean_z for v in capped]
s = sorted(centered, reverse=True)
dz = max(0.0, s[0] - s[1])
s_rival = math.log1p(sum(math.exp(z - s[1]) for z in s[2:])) if len(s) > 2 else 0.0
eff_gap = dz + math.exp(-1.0) * s_rival / (1.0 + math.exp(-(dz - s_rival)))
temp = math.exp(-1.0) + 1.0 / (1.0 + math.exp(-(math.e - eff_gap)))
exp_w = [math.exp((v - max(centered)) / temp) for v in centered]
raw_probs = {k: w / sum(exp_w) for k, w in zip(keys, exp_w)}
chosen = max(raw_probs, key=raw_probs.get)
probs = {k: round(p, 4) for k, p in raw_probs.items()}
# Routing signals for Tractus (Joint Dual-Mode) and GO (Gap-Only)
escalate_joint = (dz <= math.e) and (raw_probs[chosen] < 0.80)
escalate_go = dz <= math.e
print(f"Selected: {chosen} | Probs: {probs} | delta_z={dz:.3f} | escalate(Joint)={escalate_joint} | escalate(GO)={escalate_go}")
4.2 Dual-Mode (Tractus Joint) & Gap-Only (GO) Inference
- Joint Dual-Mode (
--mode tractus): Escalates to System 2 iffdelta_z <= eandp_max^{S1} < 0.80(with Safety Ratchet). - Gap-Only (
--mode go): Escalates to System 2 iffdelta_z <= e(omits thep_max^{S1} < 0.80guard for higher accuracy on multi-rule reasoning).
git clone https://github.com/XieShaocong33Ethan/Tractus.git && cd Tractus
# Joint Dual-Mode (System 1 + adaptive System 2)
python quickstart_dual_mode.py --model Ethan33X/Tractus-4B --mode tractus
# Gap-Only (GO) Mode
python quickstart_dual_mode.py --model Ethan33X/Tractus-4B --mode go
Or switch all three modes ("tractus-decision", "tractus", "go") in Python via UnifiedDecisionEngine:
from apse.inference.unified_decision_engine import UnifiedDecisionEngine
engine = UnifiedDecisionEngine(
model_size="4b",
quant_mode="bf16", # or "int4" for block-wise INT4 quantization
device="cuda", # or "cpu"
checkpoint_path="Ethan33X/Tractus-4B",
)
options = {
"A": "Approve under emergency airport-closure exception",
"B": "Deny because nightly rate exceeds $250",
"C": "Escalate for missing VP Finance signature only",
}
prompt = (
"State: Policy denies >$250/night unless approved by VP Finance or accompanied by an emergency "
"airport-closure notice. Receipt: $310/night; storm closure confirmed; VP Finance out of office.\n"
"Question: Should the expense claim be reimbursed?\nOptions:\n"
+ "\n".join(f"{k}: {v}" for k, v in options.items())
)
res_s1 = engine.infer(prompt, options, mode="tractus-decision") # Pure System 1 (0 reasoning tokens)
res_dm = engine.infer(prompt, options, mode="tractus") # Joint Dual-Mode (delta_z <= e and p_max < 0.80)
res_go = engine.infer(prompt, options, mode="go") # Gap-Only (GO: delta_z <= e)
print(res_s1.chosen_slot, res_dm.chosen_slot, res_go.chosen_slot)
5. License
Copyright (c) 2026 Ethan Xie (Shaocong Xie). All rights reserved.
Licensed under the Modified MIT License (license: other, license_name: modified-mit, see LICENSE):
- SME & Developer Commercial Grant: Free under standard MIT terms for commercial products and internal enterprise workflows when consolidated group trailing 12-month revenue across You and all direct/indirect Affiliates is <= $10M USD and consolidated MAU is <= 10M (must prominently display
"Powered by Tractus"on UI/docs once product revenue exceeds $1M USD or 1M MAU). - Commercial Scale & MaaS Thresholds: A separate commercial license (
xieshaocongethan@gmail.com) is required prior to deployment if (a) consolidated group trailing 12-month revenue exceeds $10M USD or 10M MAU, or (b) You/Your Affiliates provide commercial MaaS / hosted inference or fine-tuning API endpoints whose trailing 12-month MaaS revenue exceeds $100K USD. - Beneficiary Attribution & Anti-Circumvention: Custom client deployments are evaluated against the ultimate production beneficiary's consolidated group; entity splitting, SPV shells, or proxy wrappers immediately terminate license rights across all Affiliates. Preserves upstream
Qwen/Qwen3.5-BaseApache License 2.0 notice inLICENSE.
6. Citation
@misc{xie2026tractus,
title = {Tractus: Fast Dual-Mode Decision Foundation Models with Temperature-Guided Deliberation},
author = {Xie, Shaocong and Fang, Zhiming},
year = {2026},
eprint = {2611.40633},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2611.40633},
note = {Code: \url{https://github.com/XieShaocong33Ethan/Tractus}; Decision Index 0.3 Deliverables: \url{https://huggingface.co/datasets/Ethan33X/tractus-decision-index-0.3}}
}
- Downloads last month
- 52
Model tree for Ethan33X/Tractus-4B
Base model
Qwen/Qwen3.5-4B-BaseCollection including Ethan33X/Tractus-4B
Paper for Ethan33X/Tractus-4B
Evaluation results
- Balanced Skill on Decision Index 0.3self-reported41.310
- Balanced Raw Accuracy on Decision Index 0.3self-reported55.560
- Overall Accuracy (Dual-Mode Tractus, 8K) on JevBench 231self-reported88.310