blueprint-ai/NanoTitan-NLI
โก NanoTitan-NLI (33M)
NanoTitan-NLI is an ultra-compact, production-grade Natural Language Inference (NLI) and Zero-Shot Text Classification engine. Fine-tuned on the full MultiNLI (392k pairs) corpus in strict 32-bit floating-point precision (FP32), NanoTitan-NLI is designed for high-throughput intent routing, low-latency microservices, and edge deployment where larger transformers create unacceptable latency bottlenecks.
At only 33.3 million parameters (~133 MB disk footprint), NanoTitan-NLI establishes a new performance baseline for sub-50M models, scoring 85.35% on MNLI-Matched and directly outperforming full-size 110M BERT-Base and 66M DistilBERT models while operating with sub-10ms CPU inference latencies.
๐ Key Highlights
- Tier Leader (<50M Parameters): Highest recorded NLI validation score (85.35%) in the sub-50M parameter category.
- Beats Standard BERT-Base: Outperforms
bert-base-uncased(84.50%) by +0.85% while consuming 3.3ร less memory and disk footprint. - Zero Quantization Degradation: Trained end-to-end in full FP32 across all 12 transformer encoder layers to preserve exact attention weights.
- Dual-Paradigm Architecture: Operates natively as a 3-class sentence-pair NLI engine (
entailment,neutral,contradiction) or as a dynamic Zero-Shot Classifier via premise-hypothesis reformulation. - Permissive MIT License: Ready for unrestricted commercial and private enterprise deployment.
๐ Comprehensive Industry Benchmark Comparison
Evaluated on official test sets across 9 diverse tasks including core NLI entailment, multi-class topic categorization, sentiment polarity, emotion detection, and linguistic pragmatics.
1. Global Performance Matrix vs. Competing Architectures
2. Task-by-Task Accuracy Breakdown
- Average Core NLI Accuracy (In-Domain + Cross-Domain): 85.13%
- Average Zero-Shot Generalization (7 Unseen Benchmarks): 63.99%
- Comprehensive 9-Task Overall Average: 68.69%
๐ฏ Production Use Cases
- High-Throughput AI Agent Routing: Categorize user prompts into tool/function execution buckets (
["database_retrieval", "code_interpreter", "customer_support", "casual_chat"]) in sub-8ms before routing to expensive frontier LLMs. - Serverless & Edge Deployments: Deploy on AWS Lambda, Cloudflare Workers, Raspberry Pi, or CPU VPS nodes without GPU dependencies or VRAM exhaustion.
- Real-Time Stream Moderation: High-volume classification of user-generated content, reviews, and support tickets at hundreds of records per second.
- Dynamic Zero-Shot Labeling: Classify unlabelled datasets on the fly simply by defining candidate label arrays at inference time.
๐ป Quickstart Guide
1. Natural Language Inference (Sentence-Pair Classification)
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "blueprint-ai/NanoTitan-NLI"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
premise = "A soccer match is being played in a packed stadium."
hypothesis = "Athletes are actively competing in a sporting event."
inputs = tokenizer(
premise,
hypothesis,
return_tensors="pt",
truncation=True,
max_length=128
)
with torch.no_grad():
logits = model(**inputs).logits
probabilities = torch.softmax(logits, dim=-1)[0]
labels = ["entailment", "neutral", "contradiction"]
for label, score in zip(labels, probabilities):
print(f"{label:<15}: {score.item() * 100:.2f}%")2. Zero-Shot Text Classification Pipeline
from transformers import pipeline
classifier = pipeline(
"zero-shot-classification",
model="blueprint-ai/NanoTitan-NLI"
)
text = "The Federal Reserve decided to lower interest rates to stimulate market liquidity."
candidate_labels = ["economy & finance", "sports", "entertainment", "healthcare"]
results = classifier(
text,
candidate_labels=candidate_labels,
hypothesis_template="This text is about {}."
)
for label, score in zip(results["labels"], results["scores"]):
print(f"{label:<20}: {score * 100:.2f}%")
โ๏ธ Architecture & Training Specifications
Base Checkpoint: microsoft/MiniLM-L12-H384-uncased
Layers: 12 Transformer Encoder Layers
Hidden Dimension: 384
Attention Heads: 12
Total Parameters: 33,360,003
Training Dataset: Multi-Genre Natural Language Inference (nyu-mll/multi_nli) โ 392,702 training pairs
Precision: Full FP32 (Strict 32-bit floating point precision)
Optimizer: AdamW (lr=3e-5, weight_decay=0.01, eps=1e-8)
Learning Rate Schedule: Linear Warmup over 3,680 steps (10% warmup)
Total Optimization Steps: 36,816 steps (3 complete epochs)
Batch Size: 32 effective (Batch size 16 ร Gradient accumulation 2)
Max Token Length: 128 tokens training limit (Supports up to 512 positional sequence limit)
Hardware: 1ร NVIDIA GeForce GTX 1660 Super (6GB VRAM)
Training Wall Time: 1 hour 57 minutes 57 seconds
โ ๏ธ Limitations
Positional Limit: Maximum architectural token capacity is bounded at 512 tokens. Documents exceeding 512 tokens should be truncated or evaluated using sliding-window chunking.
Language Support: Optimized exclusively for English text.
Pragmatic Reasoning: Non-literal language (deep irony, complex sarcasm, and subjective bias) may exhibit lower confidence than direct factual entailment.
๐ License & Citation
This model is licensed under the MIT License.
