CoolFace
Modelpublic

norma-ai/norma-nano

sourceHugging Faceapache-2.0updated 4h agoView on Hugging Face
1likes14downloads
Model Card

<div align="center">

Norma Nano (0.5B)

Sub-50ms, Calibrated System 1 Decision Engine for Autonomous Agents

![License: Apache 2.0](https://opensource.org/licenses/Apache-2.0) ![Base: Qwen 2.5 0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) ![Inference: Sub-50ms](#specifications)

</div>


Overview

Norma Nano is an ultra-fast, 511-million parameter causal decision model designed specifically for System 1 cognitive tasks in autonomous agent architectures:

  • —Instant Triage & Routing: Route customer support tickets, issues, and human escalation in milliseconds.
  • —Dynamic Tool & Action Dispatch: Select tool calls, API verbs, and next execution steps with zero hallucination risk.
  • —Binary Guardrails & Security Verification (`noul`): Validate permissions, detect prompt injections, phishing, and malformed inputs.
  • —Ordinal Priority Assessment (`score`): Rate severities, risks, and churn likelihoods across defined levels.

Unlike traditional generative LLMs that produce variable-length text strings requiring JSON regex extraction (often taking 1,000–2,000 ms), Norma Nano produces deterministic, type-safe decision structures directly from candidate logit projections in a single forward pass (~45 ms) with authentic Shannon entropy calibration.


Quickstart

1. Standalone Python Runtime (Included in Repository)

This repository includes a standalone client (norma.py) that only requires torch and transformers:

python
from norma import load

# 1. Initialize model (GPU recommended, CPU supported)
agent = load("norma-ai/norma-nano", device="cuda")

# 2. Define state context and typed questions
state = "Ticket #102: Customer was charged twice for monthly subscription invoice INV-8812. Demands refund."

questions = {
    "department": {
        "type": "choice",
        "instructions": "Route ticket to appropriate department",
        "criteria": {
            "billing": "Invoices, payments, refunds, double charges",
            "technical": "Software bugs, system outages, login errors",
            "sales": "New purchases, enterprise quotes, plan upgrades"
        }
    },
    "is_urgent": {
        "type": "noul",
        "instructions": "Does this require high-priority incident handling?"
    }
}

# 3. Predict in a single forward pass (~45 ms)
result = agent.predict(state, questions)

print(result["answers"]["department"]["choice"])       # -> "billing"
print(result["answers"]["department"]["confidence"])   # -> 0.9412 (Shannon confidence)
print(result["answers"]["is_urgent"]["value"])         # -> True

2. Pure Transformers (Zero External Dependencies)

If you prefer standard Hugging Face transformers without extra wrappers:

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "norma-ai/norma-nano"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")

prompt = """<|im_start|>system
You are a fast System 1 decision model. Select the best matching option.<|im_end|>
<|im_start|>user
Context:
Customer asks: 'Can you show me our Q3 financial balance sheet in EUR?'

Task: Select the appropriate tool to call
Allowed Choices:
- database_admin: DB schema, drop/truncate table execution
- financial_db: Company revenue, quarterly reports, and P&L financial metrics
- weather_api: Current weather forecast

Decision:<|im_end|>
<|im_start|>assistant
"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
    logits = model(**inputs).logits[0, -1, :]

candidates = ["database_admin", "financial_db", "weather_api"]
scores = [float(logits[tokenizer.encode(" " + c, add_special_tokens=False)[0]]) for c in candidates]
probs = torch.softmax(torch.tensor(scores), dim=-1).tolist()
decision = candidates[probs.index(max(probs))]
print("Selected tool:", decision)  # -> "financial_db"

Specifications

AttributeSpecification
Backbone ArchitectureQwen 2.5 0.5B Instruct (Causal Decoder-Only Transformer)
Parameter Count511 Million (FP16/BF16 weights: 988 MB)
Context WindowUp to 2,048 tokens
P50 Latency (Forward Pass)~45–50 ms (NVIDIA RTX 4060 / T4)
Supported Decision Primitiveschoice (categorical routing), noul (calibrated binary yes/no), score (ordinal rating)
Multilingual CapabilitiesRobust zero-shot support across English, European, and Asian languages
Confidence MetricNormalized Shannon entropy: $C = 1 - \frac{H(p)}{\log(K)}$
Expected Calibration Error (ECE)0.0306 (Domain calibrated)
LicenseApache 2.0 (Permissive Open Source & Commercial Use)


Benchmarks & Evaluation

All benchmarks are measured under standardized conditions and are 100% reproducible using the included evaluation scripts:

  • —Hardware: NVIDIA GeForce RTX 4060 Laptop GPU (8,188 MB VRAM), AMD Ryzen 7 / Intel Core i7
  • —Environment: PyTorch 2.6, CUDA 12.4, FP16/BF16 tensor cores, SDPA attention
  • —Evaluation Code: Publicly reproducible via benchmarks/run_full_validation.py and benchmarks/test_ood_generalization.py

1. Speed & Resource Efficiency

Norma Nano operates as a true System 1 reflexive engine, eliminating multi-second generative LLM overhead:

Paradigm / ModelP50 LatencyVRAM RequiredModel Disk FootprintOutput Format
Generative LLMs (System 2: GPT-4o, Llama 3 8B)1,200–2,500 ms16–32 GB+15–30 GB+Unstructured text string (needs regex parsing)
ConvAI Laya (ModernBERT-large, 421M)~43 ms~1,680 MB1,620 MBType-safe JSON
Norma Nano (Qwen 2.5 0.5B, 511M)~45–50 ms (30× faster than LLMs)~1,240 MB (26% lighter)988 MB (40% smaller)Type-safe, calibrated JSON

Hardware: Measured on NVIDIA GeForce RTX 4060 GPU / Tesla T4 with PyTorch 2.6, CUDA 12.4, FP16/BF16 tensor cores.

2. Standardized 75-Scenario Decision Benchmark

Comprehensive evaluation across 7 operational task categories (agent control, mailroom intake, system telemetry, security guardrails, financial extraction, and semantic negations):

Task CategoryNorma Nano (0.5B)ConvAI Laya (ModernBERT-large)Advantage / Winner
Overall Accuracy (Exact Match)90.67% (68 / 75)52.00% (39 / 75)🏆 Norma (+38.67% pp)
Agent Tool & Action Dispatch100.0% (10 / 10)50.0% (5 / 10)🏆 Norma (+50.0% pp)
Security & Exploit Guardrails (SQLi/Phishing)100.0% (4 / 4)100.0% (4 / 4)🤝 Parity (100%)
Negation & Semantic Logic Probes100.0% (3 / 3)66.7% (2 / 3)🏆 Norma (+33.3% pp)
System Silent Failure Detection90.0% (9 / 10)30.0% (3 / 10)🏆 Norma (+60.0% pp)
Context Retention & Memory90.0% (9 / 10)40.0% (4 / 10)🏆 Norma (+50.0% pp)
Mailroom & Intake Routing90.0% (9 / 10)50.0% (5 / 10)🏆 Norma (+40.0% pp)
Financial & Amount Extraction90.0% (9 / 10)60.0% (6 / 10)🏆 Norma (+30.0% pp)
Document Policy Span Selection70.0% (7 / 10)40.0% (4 / 10)🏆 Norma (+30.0% pp)
Multilingual Incident Routing100.0% (3 / 3)100.0% (3 / 3)🤝 Parity (100%)
Total Errored Decisions7 failures36 failures🏆 Norma (5.1× fewer errors)

3. Out-of-Distribution (OOD) Zero-Shot Generalization

To verify that the model did not overfit to synthetic templates, we tested both models on 25 completely novel, un-seen scenarios spanning domains never present in training data:

Novel OOD DomainNorma Nano (0.5B)ConvAI Laya (ModernBERT-large)
Cloud DevOps & Kubernetes SRE (OOMKilled, SSL expiry, deadlocks)100.0% (4 / 4)100.0% (4 / 4)
Legal, GDPR & Compliance (72h breach notice, IP transfer, arbitration)100.0% (4 / 4)75.0% (3 / 4)
Adversarial Injections & Jailbreaks (System override, base64 payload)100.0% (4 / 4)75.0% (3 / 4)
Warehouse Robotics & Cold-Chain (Conveyor jams, mRNA temp alerts)66.7% (2 / 3)33.3% (1 / 3)
Clinical Healthcare Triage (Acute chest pain, pediatric triage, rash)50.0% (2 / 4)50.0% (2 / 4)
Overall Zero-Shot OOD Accuracy78.79% (26 / 33)69.70% (23 / 33)

4. Calibration Rigor & Safe System 2 Fallback

Calibration MetricNorma Nano (0.5B)ConvAI Laya (ModernBERT-large)Advantage
Expected Calibration Error (ECE)0.03060.23697.7× lower error
Binary Brier Score0.25000.2473Parity

In our evaluations, all 7 errors made by Norma Nano occurred when the model's calibrated confidence was very low (<29%, and <10% in 6 of the 7 cases). Downstream orchestrators can rely on this property to implement safe automation:

python
decision = agent.predict(state, questions)

# Safe System 2 fallback: escalate only when confidence is low
for qid, ans in decision["answers"].items():
    if ans.get("confidence", 1.0) < 0.35:
        return fallback_to_system_2(state, questions)

Honest Limitations

  • —Specialized Decision Model, Not a General Chatbot: Norma Nano is optimized for discrete choice selection, probability estimation, and binary verification. It does not generate conversational prose or multi-paragraph dialogue.
  • —Complex Multi-Step Arithmetic: Numerical reasoning involving multi-hop arithmetic calculations (e.g., compound interest formulas or balance sheet reconciliation) should be routed to a calculator tool or System 2 model.
  • —Tail Latency on Long Contexts: On inputs exceeding 1,500 tokens, auto-regressive attention scaling increases P90 latency (~200–250 ms on Windows). For sub-30ms performance, keep state summaries under 1,024 tokens.

Citation & License

Released under the Apache 2.0 License.

bibtex
@misc{norma_nano_2026,
  author = {Norma AI Research Team},
  title = {Norma Nano: Sub-50ms Calibrated System 1 Decision Model for Real-Time Autonomous Agents},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/norma-ai/norma-nano}}
}