ClassOne: System 1 Decision Model Architecture
ClassOne is an open-source System 1 decision model architecture. Rather than generating conversational prose token-by-token (System 2 mechanics), ClassOne performs rapid, deterministic, schema-constrained decision execution across classification, routing, verification, and scoring in a single non-autoregressive forward pass.
Inspired by Daniel Kahneman's cognitive framework in Thinking, Fast and Slow and strictly proper scoring rules (Brier, 1950; Gneiting & Raftery, 2007).
Benchmark Highlights
ClassOne achieves state-of-the-art decision accuracy and probability calibration across 5 rigorous benchmark suites: JevBench v1.6.1 (231 public tasks across Easy, Original, and Hard tiers), Hugging Face Decision Index (5 canonical domains), RLCDAlignBench (10 safety and alignment failure modes), NVIDIA When2Call (stratified tool-routing decisions), and Deepset Prompt Injections (jailbreak and adversarial input defense):
Multi-Suite Benchmark Scorecard (Pillar 2 Precision Release)
| Model Backbone | Effective Params | JevBench v1.6.1 (231 Tasks) | HF Decision Index (100 Pts) | RLCDAlignBench Balanced Acc | NVIDIA When2Call (Tool Routing) | Deepset Prompt Injections | Median Latency (Edge GPU) |
|---|---|---|---|---|---|---|---|
| ClassOne Qwen 3.5 9B | 9.0B | 79.7% (184/231, ECE: 0.0059) | 100.00 / 100.00 | 65.1% (AUROC: 0.706) | 75.00% (97.1% Recall) | 71.55% (AUROC: 0.7902) | 115.1 ms |
| ClassOne Qwen 3.5 4B | 4.0B | 76.2% (176/231, Hard: 53.2%) | 98.99 / 100.00 (ECE: 0.0251) | 51.6% (AUROC: 0.582) | 34.00% (88.2% Recall) | 78.45% (AUROC: 0.8606) | 61.1 ms |
| ClassOne Gemma 4 E4B | 4.3B (Multimodal) | 72.7% (168/231, Hard: 46.0%) | 97.16 / 100.00 (ECE: 0.0265) | 58.4% (Refusal: 54.5%) | 46.00% (97.1% Recall) | 63.79% (AUROC: 0.7485) | 68.4 ms |
| ClassOne Qwen 3.5 2B | 2.0B | 69.7% (161/231, Hard: 47.8%) | 96.41 / 100.00 (ECE: 0.0482) | 50.9% (ECE: 0.2437) | 37.00% (97.1% Recall) | 51.72% (AUROC: 0.8246) | 40.3 ms |
| ClassOne Gemma 4 E2B | 2.0B | 59.3% (137/231, Easy: 91.7%) | 76.82 / 100.00 (ECE: 0.1960) | 51.9% (ECE: 0.2659) | 35.00% (82.4% Recall) | 57.76% (AUROC: 0.6185) | 44.8 ms |
| TypeSafe Jev (Proprietary) | Closed API | 67.5% (156/231) | — | — | — | — | ~850 ms (Network) |
Detailed JevBench v1.6.1 Tier Breakdown
| Model Backbone | Easy Tier (48) | Original Tier (72) | Hard Tier (111) | Overall JevBench (231) |
|---|---|---|---|---|
| ClassOne Qwen 3.5 9B | 100.0% (48/48, ECE: 0.0012) | 97.2% (70/72, ECE: 0.0059) | 59.5% (66/111, ECE: 0.2826) | 79.7% (184/231) |
| ClassOne Qwen 3.5 4B | 100.0% (48/48, ECE: 0.0084) | 95.8% (69/72, ECE: 0.0416) | 53.2% (59/111, ECE: 0.3008) | 76.2% (176/231) |
| ClassOne Gemma 4 E4B | 100.0% (48/48, ECE: 0.0057) | 95.8% (69/72, ECE: 0.0401) | 46.0% (51/111, ECE: 0.3313) | 72.7% (168/231) |
| ClassOne Qwen 3.5 2B | 100.0% (48/48, ECE: 0.0503) | 83.3% (60/72, ECE: 0.0606) | 47.8% (53/111, ECE: 0.2776) | 69.7% (161/231) |
| ClassOne Gemma 4 E2B | 91.7% (44/48, ECE: 0.0700) | 70.8% (51/72, ECE: 0.2778) | 37.8% (42/111, ECE: 0.5243) | 59.3% (137/231) |
Key Architectural Innovations
- Bilinear Interaction Scorer (
ChoiceHead): Combines scaled dot-product attention with full non-linear bilinear matching: $$\text{features} = [q;, k;, |q - k|;, q \odot k], \quad \text{logits} = \frac{q \cdot k}{\sqrt{d}} + \text{MLP}(\text{features})$$ Enables deep interaction matching between prompt instructions and semantic candidate descriptions without sequence decode. - Question Preamble Conditioning:
For documents $>600$ tokens, the prompt builder automatically injects
<|state_start|>\nTarget Objectives:\n...\n<|state_end|>ahead of the state body, priming causal self-attention across all transformer layers to resolve hard multi-hop contract constraints. - 2D / 4D Position-Invariant Attention Mask: Eliminates option-order recency bias by isolating candidate options during ingestion so choices attend only to the state and criteria without causally attending to earlier options.
- Scale-Invariant Normalized Confidence: Computes calibrated confidence invariant to candidate set size: $$\text{Confidence} = \frac{K \cdot P_{\max} - 1}{K - 1} \quad \text{for } K \text{ choices}$$
- Precision Guard & Dynamic Quantization: Backbone weights support 4-bit NF4 and 8-bit dynamic quantization while decision heads remain strictly in FP16 / FP32 to preserve calibrated probability margins.
- Ultra-Low Latency CPU Containerization: Containerized execution on 2 vCPUs and 8GB RAM achieves 2,097.15 tokens/sec and 19.54 decisions/sec at 754.6 ms median latency (0 GPUs, 0 GGUF).
Training Methodology: RLCD (Reinforcement Learning for Calibrated Decisions)
ClassOne models are aligned using Strictly Proper Scoring Rules rather than open-ended conversational RLHF:
- Multi-Objective RLCD Loss:
$$\mathcal{L}{\text{RLCD}} = \alpha \mathcal{L}{\text{Focal}}(\gamma=2.0) + \beta \mathcal{L}{\text{Brier}} + \lambda \mathcal{L}{\text{Margin}}$$
- Focal Log-Loss: Down-weights easy examples and forces gradient updates to concentrate on hard decision boundaries.
- Brier Score: Penalizes probability deviation, mathematically guaranteeing that the model has zero incentive to hedge or hallucinate unwarranted overconfidence.
- Contrastive Margin Penalty: Directly penalizes decisions with sub-threshold logit separation between top-1 and distractor options.
- Temperature Floor Clamping: Post-hoc temperature scaling prevents probability softening by enforcing empirical calibration floors: $$T_{\text{noul}} \in [0.45, 0.60], \quad T_{\text{choice}} \in [0.45, 0.60], \quad T_{\text{score}} \in [0.55, 0.65]$$
- Progressive Multi-Stage Curricula: Trained on a 23,500-sample human-curated curriculum spanning ContractNLI, CUAD, SciQ, Banking77, ToxicChat, XSTest, and Agentic boundary pairs.
- Weight-Averaged Model Souping:
Combines converged LoRA weights and decision heads across curriculum stages (
soup_heads_70.py), yielding monotonic calibration and benchmark gains.
Published Models on Hugging Face Hub
| Repository ID | Base Model | Context | Calibrated Heads SHA256 (Verified on Hub) | Formats |
|---|---|---|---|---|
devops-thiago/classone-qwen3.5-9b |
Qwen/Qwen3.5-9B | 128k | 68FCDB3106BD5026B7CAFF507293961C16BD6BA178F74E9CFBF6266317C2A141 |
BF16, 4-bit NF4, LoRA |
devops-thiago/classone-qwen3.5-4b |
Qwen/Qwen3.5-4B | 128k | 654DA038EA5883916F3323F1A5BE64DEEFADB864B2EAE48DF9CD915D9C8A8F66 |
BF16, 4-bit NF4, LoRA |
devops-thiago/classone-gemma4-e4b |
google/gemma-4-E4B-it | 128k | 4295F5B80743B6B37714398D6A1DFDB0E8077A66E5DFA9F0447E6A0CD2E35380 |
BF16, 4-bit NF4, LoRA |
devops-thiago/classone-qwen3.5-2b |
Qwen/Qwen3.5-2B | 128k | 01EA45F9173F72B6893FEEE62205E40B497C6A70A0EFCAAD5DCFA4F527C966D5 |
FP16, 8-bit, LoRA |
devops-thiago/classone-gemma4-e2b |
google/gemma-4-e2b-it | 128k | 5A1DBA4D8D2CFD47A3FB0FA4E8460C36A55ECB14A1EFF3D5682FD2390D92049B |
FP16, 8-bit, LoRA |
Quickstart
1. Installation
git clone https://github.com/devops-thiago/class-one.git
cd class-one
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
2. Run Test Suite
pytest tests/ -v
3. Start API Service
uvicorn classone.server.app:app --host 0.0.0.0 --port 8000
4. Query via Python SDK
from classone import ClassOneClient, Choice, Noul, Score
with ClassOneClient(base_url="http://localhost:8000") as client:
response = client.decide(
state="Customer account was locked after three incorrect attempts within 15 minutes.",
questions={
"urgent": Noul(instructions="Is this an urgent security event?"),
"action": Choice(
instructions="Action required:",
criteria={
"unlock": "Send automated unlock verification link",
"escalate": "Escalate to SecOps fraud team",
},
),
"severity": Score(instructions="Assess severity:", criteria=["low", "medium", "critical"]),
},
)
print("Urgent P(true):", response.nouls["urgent"].noul)
print("Action Choice:", response.choices["action"].choice)
print("Choice Margin:", response.choices["action"].margin)
print("Severity Score:", response.scores["severity"].score)
Docker Deployment (2 vCPUs, 8GB RAM, Pure CPU)
Build and deploy the lean CPU container with zero GPU requirements:
# 1. Build image (uses CPU-only PyTorch wheels)
docker build -t classone:cpu .
# 2. Run container constrained to 2 vCPUs and 8GB RAM
docker run -d --name classone-cpu \
--cpus=2 --memory=8g -p 8000:8000 \
-e CLASSONE_DEVICE=cpu \
-e CLASSONE_BASE_MODEL=/app/checkpoints/classone_cpu_q8.pt \
-v "$(pwd)/checkpoints:/app/checkpoints:ro" \
classone:cpu
# 3. Run parallel load benchmark (5 concurrent worker threads)
python scripts/benchmark_docker_cpu.py --url http://localhost:8000 --concurrency 5 --requests 50
Evaluation & Benchmark Reproduction
1. Official JevBench v1.6.1 Benchmark (4-Axis Harmonic Mean)
Evaluates chance-corrected Intelligence (equal type weighting across Choice, Noul, Score), multi-bin Expected Calibration Error, Speed (logarithmic latency scoring), and Cost (tariff per 1,000 decisions):
# Evaluate Qwen 3.5 9B locally on GPU:
python scripts/eval_jevbench_v16.py --mode local
# Evaluate against live HTTP API endpoint:
python scripts/eval_jevbench_v16.py --mode api --endpoint http://127.0.0.1:8000/v1/decide
Official JevBench v1.6.1 Scorecard (ClassOne Qwen 3.5 9B):
| Axis | Weight | Score (0–100) | Metric Details |
|---|---|---|---|
| Composite Score | 100% | 73.48 🏆 | Equal-weight 4-axis Harmonic Mean |
| Capability Score | — | 75.85 | Harmonic Mean of Intelligence & Calibration |
| Axis 1: Intelligence | 25% | 81.38 | Choice: 85.07 | Noul: 84.07 | Score: 75.00 |
| Axis 2: Calibration | 25% | 71.02 | ECE: 0.1549 | Brier: 0.1596 |
| Axis 3: Speed | 25% | 89.01 | p50: 148.5 ms | p95: 845.0 ms |
| Axis 4: Cost | 25% | 59.41 | $0.02253 per 1,000 decisions |
Public Tiers: Easy 100.0% (48/48), Standard 97.2% (70/72), Hard 56.8% (63/111).
2. Hugging Face Decision Index (multimodalart/jev-decision-index)
Evaluates decision quality across all 5 canonical capability domains and generates official submission manifests (scores.json and index.json):
# Evaluate Qwen 3.5 9B locally on GPU:
python scripts/eval_decision_index.py --mode local
# Evaluate against live HTTP API endpoint:
python scripts/eval_decision_index.py --mode api --endpoint http://127.0.0.1:8000/v1/decide
Official Decision Index Results (ClassOne Qwen 3.5 9B):
| Capability Domain | Official Weight | Domain Score | Raw Accuracy |
|---|---|---|---|
| Knowledge & Verification | 25.8% | 100.00 | 100.0% (10/10) |
| Language & Policy Contracts | 25.8% | 100.00 | 100.0% (10/10) |
| Retrieval & Relevance Triage | 20.0% | 100.00 | 100.0% (10/10) |
| Tools & Execution Guardrails | 18.3% | 100.00 | 100.0% (10/10) |
| Rubric & Quality Scoring | 10.1% | 100.00 | 100.0% (10/10) |
| Overall Decision Index | 100.0% | 100.00 🏆 | Overall ECE: 0.0051 |
3. Additional Benchmark Suites & Reproduction Commands
All benchmark evaluation scripts support both local checkpoint paths and Hugging Face Hub identifiers:
# 1. JevBench v1.6.1 All Tiers (231 tasks: Easy, Original, Hard):
python scripts/eval_jevbench_all_tiers.py devops-thiago/classone-qwen3.5-9b checkpoints/snapshots/best_qwen9b_pillar2_65pct_alignbench/classone_heads.pt --pause-tokens 0
# 2. Hugging Face Decision Index (5 domains):
python scripts/eval_decision_index.py --mode local --model-path devops-thiago/classone-qwen3.5-9b --heads-path checkpoints/snapshots/best_qwen9b_pillar2_65pct_alignbench/classone_heads.pt
# 3. RLCDAlignBench (100 safety/alignment failure modes):
python scripts/eval_rlcd_alignbench.py devops-thiago/classone-qwen3.5-9b checkpoints/snapshots/best_qwen9b_pillar2_65pct_alignbench/classone_heads.pt --pause-tokens 0
# 4. NVIDIA When2Call (stratified tool-routing benchmark):
python scripts/eval_when2call.py --model devops-thiago/classone-qwen3.5-9b --heads checkpoints/snapshots/best_qwen9b_pillar2_65pct_alignbench/classone_heads.pt --limit 100 --pause-tokens 0
# 5. Deepset Prompt Injections (adversarial injection defense):
python scripts/eval_prompt_injection.py --model devops-thiago/classone-qwen3.5-9b --heads checkpoints/snapshots/best_qwen9b_pillar2_65pct_alignbench/classone_heads.pt --pause-tokens 0
# Verify all published Hugging Face models via SDK:
python scripts/test_all_hf_models_sdk.py
Reference & Deep Dives
- Architecture Specification:
ARCHITECTURE.md - Empirical Learnings & Plateau Analysis:
docs/empirical_learnings_and_plateau_analysis.md - Docker CPU Benchmarks:
docs/docker_cpu_benchmarks.md - Hugging Face Collection:
devops-thiago/classone-system-1-decision-models - Training Dataset Release:
devops-thiago/classone-system-one-curriculum
Client SDKs & Package Distribution
ClassOne provides official client libraries across 6 languages with native HTTP transports, zero unnecessary dependencies, and type-safe probabilistic primitives (Noul, Choice, Score):
| Language | Package Registry | Installation / Dependency | Repository |
|---|---|---|---|
| Python | PyPI (classone) |
pip install classone |
Built-in (src/classone/sdk) |
| Node.js / TS | npm (@classone/sdk) |
npm install @classone/sdk |
classone-sdks/nodejs |
| Go | pkg.go.dev | go get github.com/devops-thiago/classone-sdks/go@v0.1.1 |
classone-sdks/go |
| Rust | crates.io (classone) |
cargo add classone |
classone-sdks/rust |
| Java | Maven Central (io.classone:classone-sdk) |
implementation 'io.classone:classone-sdk:0.1.1' |
classone-sdks/java |
| Ruby | RubyGems (classone) |
gem install classone |
classone-sdks/ruby |
To verify all SDKs against a running server:
python scripts/test_all_sdks_live.py --url http://127.0.0.1:8000
python scripts/package_and_verify_all_sdks.py
License & Attribution
- Released under the Apache 2.0 License.
- Gemma is a trademark of Google LLC and provided subject to the Gemma Terms of Use.
- Qwen is developed by the Qwen Team at Alibaba Cloud and provided under the Apache 2.0 License.
Metadata
Release files for classone 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| classone-0.2.1.tar.gz | 56.5 kB | With provenance | Details for classone-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| classone-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for classone-0.2.1-py3-none-any.whl |
Total release size: 96.4 kB
Release files / classone-0.2.1.tar.gz
| Download URL | classone-0.2.1.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edb5db81ef4837bed063e430c8351eebecc9b4663c1a90f186eba192010cf379
|
|
BLAKE2b-256 checksum How to use checksums |
41b8e3b258a52dbb83bd8bc87c34a67ada7d9d4eb6cb7b6116cea06f6efda46c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / classone-0.2.1-py3-none-any.whl
| Download URL | classone-0.2.1-py3-none-any.whl |
|---|---|
| Size | 39.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f41fd0d50ebfe3fde170c1606a0b1c2a1154b211d78cc77784a70b15b5ce3851
|
|
BLAKE2b-256 checksum How to use checksums |
c95844c125e399716d5c0e780e45d54caf2ac6698a4fae2d539d67370fd79282
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for classone 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for classone-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.