IdeaLens-ModernBERT-L-NoParaphrase is an idea-level detector: it judges whose ideas a document contains, not who wrote its words, so a document whose ideas are a person's counts as human however much of its prose an AI wrote. It is one of the detectors released with IdeaLens and trained on the same data. The idealens package (PyPI) runs the whole pipeline: it assigns each document one of the eight formats, extracts the outline with the prompt, role vocabulary and worked examples the detectors were trained with, and scores it with this model and the thresholds in this repo. Input is JSONL with a text field per document. To score outlines you already have, use idealens score outlines.jsonl -o…
dev-0.4b is an open-weight model for text classification from Nikhil Pujari, released under Apache License 2.0. It has 397M parameters. At 16-bit it needs about 1 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.
Dev is an open-source 399M parameter bidirectional decision model built on ModernBERT-large.
Runs On
What it takes to serve dev-0.4b (397M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.8 GB | 1.0 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.4 GB | 0.5 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.2 GB | 0.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 6, 2026.
dev-0.4b on every accelerator the SAVRN Index prices, at every precision
Model Card
By Nikhil Pujari, published under apache-2.0, revision 3c6ef9285ae6.
Dev is an open-source 399M parameter bidirectional decision model built on ModernBERT-large. It is purpose-built for unstructured-to-structured classification—including ticket routing, yes/no verification, and rating scales—executing in a single forward pass (~28ms on MPS) without token generation. Following Jev (TypeSafe) and Kev-0.5B (Jared Palmer), Dev tests a fundamental architectural question: What if decision models shouldn't be causal decoders at all, but native bidirectional cross-encoders? Evaluated against Jared Palmer's kev-0.5b (built on a frozen Qwen-2.5-0.5B causal backbone + 9.3M LoRA pointer head): Inference Latency: Dev-0.4B executes in 27.6ms on Apple Silicon MPS (M1 Max)…
Read Nikhil Pujari's full model card
Dev (dev-0.4b): 399M Bidirectional Decision Model
Dev is an open-source 399M parameter bidirectional decision model built on ModernBERT-large. It is purpose-built for unstructured-to-structured classification—including ticket routing, yes/no verification, and rating scales—executing in a single forward pass (~28ms on MPS) without token generation.
Following Jev (TypeSafe) and Kev-0.5B (Jared Palmer), Dev tests a fundamental architectural question: What if decision models shouldn't be causal decoders at all, but native bidirectional cross-encoders?
Key Performance Results
Evaluated against Jared Palmer's kev-0.5b (built on a frozen Qwen-2.5-0.5B causal backbone + 9.3M LoRA pointer head):
| Benchmark / Task | What It Tests | Kev-0.5B (Causal Qwen2.5) | Dev-0.4B (Bidirectional ModernBERT) | Result |
|---|---|---|---|---|
| MTEB Banking77 | 77-Way Intent Routing | 86.0% | 91.33% (Top-3: 98.67%) | +5.33% Win |
| Google BoolQ | Reading Verification | 75.3% | 85.20% | +9.90% Win |
| Yelp Reviews | 5-Star Rating (Exact / MAE) | 55.3% | 62.67% (MAE: 0.4017) | +7.37% Win |
Inference Latency: Dev-0.4B executes in 27.6ms on Apple Silicon MPS (M1 Max) and ~10ms on CUDA FP16 SDPA (single forward pass, zero token generation loops).
Dev also reranks Python code retrieval modestly above a BM25 lexical baseline on the CodeSearchNet human-judgment benchmark (0.8203 vs 0.7652 NDCG@10 on test). We treat this as a capability check, not a headline benchmark.
Core Architecture
-
Native Bidirectional Attention (
ModernBERT-large): Instead of causal decoders with lower-triangular masks, Dev uses unconstrained bidirectional cross-attention across all 28 transformer layers. - When choices are listed on the token tape, Option 1 can attend forward to Option 4, enabling true mutual candidate conditioning and eliminating position/recency bias. - Runs on hardware-fused SDPA kernels (mask=None) on CUDA and Apple Silicon MPS. - Native 8k context window. -
Three Tasks, One Dynamic Head: Instead of separate heads for classification, verification, and regression, Dev realizes that all three tasks are fundamentally classification: - Categories (Routing): Classification over $N$ candidate options in the prompt. - Yes / No: Classification over two options:
["No", "Yes"]. - Rating (1–5 scale): Classification over ordered scale levels (["1 star", ..., "5 stars"]), taking the expected value. -
Dynamic Choices via the GLiNER Mechanism: Borrowing the core insight from GLiNER, candidate choices are not hardcoded into neural network weights. They are written as natural language text directly inside the prompt. Dev's single 2-layer choice head evaluates whatever choices you provide on the fly.
-
Single Forward Pass: The document and all candidate options are evaluated together in one single forward pass (~28ms on MPS, ~10ms on CUDA), rather than running separate passes per option.
Post-Training Calibration: Temperature Scaling (Guo et al. 2017)
Cross-Entropy loss separates classes effectively, but its logarithmic tail pushes logits toward extreme values (±infinity), producing overconfidence. While boolean verification comes out of SFT essentially calibrated (ECE: 0.016), multi-class choice and ordinal scoring are significantly overconfident.
Because Dev uses a single universal choice head, fine-tuning the shared head under Brier loss creates cross-task gradient tension and vanishing gradients ($2(p - y) \cdot p(1 - p) \to 0$).
Instead, Dev applies per-readout temperature scaling (Guo et al., 2017) fit post-hoc on held-out validation data by minimizing NLL:
| Readout | Fitted T | Validation ECE (equal-mass) | NLL | Top-1 Accuracy |
|---|---|---|---|---|
| Noul (boolean) | 1.3575 | 0.016 (already low here) | 0.17 → 0.15 | 0.967 → 0.967 (Invariant) |
| Choice (categorical) | 4.2542 | 0.189 → 0.083 | 2.26 → 0.73 | 0.782 → 0.782 (Invariant) |
| Score (ordinal) | 3.7097 | 0.332 → 0.117 | 2.59 → 1.14 | 0.545 → 0.545 (Invariant) |
On the external, unseen benchmarks, the shipped temperatures generalize, accuracy exactly invariant:
| Benchmark (readout) | ECE: raw → calibrated | Accuracy |
|---|---|---|
| Google BoolQ (noul, n=500) | 0.103 → 0.077 (−25%) | 0.852 → 0.852 |
| Banking77 (choice, n=300) | 0.075 → 0.055 (−27%) | 0.913 → 0.913 |
| Yelp (score, n=300) | 0.318 → 0.155 (−51%) | exact 0.627 → 0.627 |
- Choice & Score were badly overconfident out of SFT; their ECE falls by half or more.
- Boolean looked already-calibrated on the validation set (0.016) but is overconfident on external BoolQ; its fitted T = 1.36 cuts BoolQ ECE 0.103 → 0.077. The temperatures are fit on validation and checked on the held-out benchmarks.
- Ordinal point estimate: flattening the score distribution raises Yelp MAE modestly (0.402 → 0.429, still sub-half-star). ECE and MAE trade off smoothly as T grows.
- 100% Accuracy Invariance: temperature scaling is strictly monotonic, so all top-1 accuracies, rankings, and benchmark scores are untouched.
Temperatures are saved in run.json and automatically applied at readout during inference.
Quickstart & Usage
Installation
git clone https://github.com/nikhilpujari/dev.git
cd dev
pip install -e .
Python Inference
from dev.inference import Predictor
# Load from Hugging Face Hub or local directory ("runs/dev-0.4b")
predictor = Predictor("mpnikhil/dev-0.4b", device="auto")
# 1. Routing to Categories (~28ms MPS, Calibrated)
result = predictor.answer(
state="Customer cannot log in. Password reset email is failing with 550 Mailbox Unavailable.",
questions={
"route_ticket": {
"type": "choice",
"instructions": "Assign this ticket to the appropriate queue.",
"criteria": [
"billing_support",
"email_infrastructure",
"account_security",
"general_inquiry"
]
}
}
)
print(result["route_ticket"])
# Output:
# {
# 'criterion': 'email_infrastructure',
# 'confidence': 0.9987,
# 'calibrated': True
# }
# 2. Yes / No Verification
res_noul = predictor.answer(
state="ModernBERT uses hardware-fused SDPA kernels and 8k context natively.",
questions={
"has_8k": {
"type": "noul",
"instructions": "Does the passage state ModernBERT supports 8k context?",
"criteria": ["No", "Yes"]
}
}
)
print(res_noul["has_8k"])
# Output:
# {
# 'criterion': 'Yes',
# 'probability_yes': 0.9942,
# 'calibrated': True
# }
# 3. Rating on an Ordinal Scale (Expected Value + Normalized Variance)
score_result = predictor.answer(
state="Pull request refactors cache layer, adds 14 unit tests, and passes all CI checks.",
questions={
"code_quality": {
"type": "score",
"instructions": "Rate pull request quality on a 1-5 scale.",
"criteria": ["Poor", "Needs Work", "Acceptable", "Good", "Excellent"]
}
}
)
print(score_result["code_quality"])
# Output:
# {
# 'value': 3.84, # Expected score
# 'variance': 0.14, # Clustered consensus
# 'confidence': 0.965, # Normalized certitude
# 'calibrated': True
# }
Intended Use & Limitations
- Intended Use: High-throughput, low-latency unstructured-to-structured classification (support ticket routing, log triage, assertions, guardrail verification, rubric rating).
- Limitations: Dev is a non-generative decision model. It does not output autoregressive text, stream tokens, or perform Chain-of-Thought (CoT) generative reasoning. For tasks requiring reasoning traces or text generation, use a causal generative LLM.
Lineage & Acknowledgments
- TypeSafe: For introducing Jev and demonstrating the power of non-generative decision models.
- Archer Hume: For reverse-engineering Jev's behavioral blueprint across 10,000 API calls in “Jev’s Architecture Unmasked”.
- Jared Palmer: For open-sourcing Kev-0.5B on Hugging Face, establishing the single-pass causal decoder baseline.
- Answer.AI & LightOn: For pretraining ModernBERT (
answerdotai/ModernBERT-large), the 399M parameter bidirectional encoder backbone. - Urchade Zaratiana et al.: For GLiNER, whose candidate-span pooling mechanism directly inspired our dynamic choice head.
Citations & References
Foundational Architectures & Calibration
@article{vaswani2017attention,
title={Attention is All You Need},
author={Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N and Kaiser, {\L}ukasz and Polosukhin, Illia},
journal={Advances in Neural Information Processing Systems},
volume={30},
year={2017},
url={https://arxiv.org/abs/1706.03762}
}
@article{warner2024modernbert,
title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Long-Context Representation},
author={Warner, Benjamin and Chaffin, Antoine and Clavi{\'e}, Benjamin and Weller, Orion and Hallstr{\"o}m, Oskar and Taghadouei, Saeed and Aarsen, Tom and Shakir, Nathan and Douze, Matthijs and Lipani, Aldo and others},
journal={arXiv preprint arXiv:2412.13663},
year={2024},
url={https://arxiv.org/abs/2412.13663}
}
@article{zaratiana2023gliner,
title={GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer},
author={Zaratiana, Urchade and Tomeh, Nadi and Holat, Pierre and Chaffin, Antoine},
journal={arXiv preprint arXiv:2311.01079},
year={2023},
url={https://arxiv.org/abs/2311.01079}
}
@inproceedings{guo2017calibration,
title={On Calibration of Modern Neural Networks},
author={Guo, Chuan and Pleiss, Geoff and Sun, Yu and Weinberger, Kilian Q},
booktitle={International Conference on Machine Learning},
pages={1321--1330},
year={2017},
organization={PMLR},
url={https://arxiv.org/abs/1706.04599}
}
Datasets
- PolyAI/banking77: Casanueva, I. et al. (2020). Efficient Intent Detection with Dual Sentence Encoders Applications to Banking. Hugging Face Dataset.
- google/boolq: Clark, C. et al. (2019). BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions. Hugging Face Dataset.
- code_search_net: Husain, H. et al. (2019). CodeSearchNet Challenge: Evaluating the State of Semantic Code Search. Hugging Face Dataset.
- yelp_review_full: Zhang, X. et al. (2015). Character-level Convolutional Networks for Text Classification. Hugging Face Dataset.
License
Apache 2.0
Identity and Version
- Repository
- mpnikhil/dev-0.4b
- Publisher
- Nikhil Pujari
- Task
- Text classification
- Modality
- Text
- Library
- transformers
- Parameters
- 397M parameters
- Languages
- en
- Revision
- 3c6ef9285ae60895ad2121f511e36ed094e1d61b
- First published
- 2026-09-20
- Last updated
- 2026-09-21
Files and Weights
12 files, 1.6 GB in total. The weights are 1 file totalling 1.6 GB in safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 1.6 GB | c876fa0d2921 |
| encoder/config.json | Configuration | 1.2 KB | — |
| run.json | Configuration | 2.2 KB | — |
| tokenizer/special_tokens_map.json | Configuration | 694 B | — |
| README.md | Documentation | 12.4 KB | — |
| assets/benchmark_scorecard.png | Other | 135.9 KB | bc6ff3631f29 |
| assets/causal_vs_bidirectional.jpg | Other | 113.6 KB | eac148bf1472 |
| assets/dev_hero_banner.jpg | Other | 642.3 KB | e6ec3b7a3313 |
| assets/dynamic_choice_readout.png | Other | 447.4 KB | 446513207ff5 |
| .gitattributes | Repository | 1.8 KB | — |
| tokenizer/tokenizer.json | Tokenizer | 3.6 MB | — |
| tokenizer/tokenizer_config.json | Tokenizer | 20.8 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 1.6 GB
Released by Nikhil Pujari through its official repository on Hugging Face. Read the license.
Built From
- Described by arXiv:1706.03762
- Described by arXiv:1706.04599
- Described by arXiv:2311.01079
- Described by arXiv:2412.13663
- Trained on (disclosed) PolyAI/banking77
- Trained on (disclosed) code_search_net
- Trained on (disclosed) google/boolq
- Trained on (disclosed) yelp_review_full
Evaluations
Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.
| Benchmark | Conditions | Result | Reported by | Revision | Date |
|---|---|---|---|---|---|
| Banking77 | Task 77-Way Intent RoutingMetric Top-1 AccuracyComparison conditions not established | 0.9133 | mpnikhil Publisher reported |
Evaluated revision not stated | — |
| Banking77 | Task 77-Way Intent RoutingMetric Top-3 RecallComparison conditions not established | 0.9867 | mpnikhil Publisher reported |
Evaluated revision not stated | — |
| Google BoolQ | Task Boolean VerificationMetric AccuracyComparison conditions not established | 0.852 | mpnikhil Publisher reported |
Evaluated revision not stated | — |
| Yelp Review Full | Task 5-Star Graded ScoringMetric Exact AccuracyComparison conditions not established | 0.6267 | mpnikhil Publisher reported |
Evaluated revision not stated | — |
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 1.6 GB |
| 16-bit | 0.8 GB |
| 8-bit | 0.4 GB |
| 4-bit | 0.2 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About dev-0.4b
How much GPU memory does dev-0.4b need?
About 1 GB at 16-bit and 0.2 GB at 4-bit: the weights (397M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run dev-0.4b on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use dev-0.4b commercially?
Yes. dev-0.4b is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
Similar Models
ProseLens-ModernBERT-L is a prose-level detector: it reads the document itself and judges who wrote the words. It is the ModernBERT counterpart of ProseLens and the comparison point for the idea-level detectors. Score documents directly; no outline is needed. The idealens package (PyPI) applies this model and the thresholds in this repo: Input is JSONL with a text field per document. thresholds.json holds this model's cuts at 0.1%, 0.5%, 1%, 2% and 5% false-positive rates, fitted on the 80,000 human documents of WildOutlines' calibration split: one global cut per rate, plus per-format cuts. The package applies them. A cut fitted for one model does not transfer to another model's scores. For…
IdeaLens-ModernBERT-L is an idea-level detector: it judges whose ideas a document contains, not who wrote its words, so a document whose ideas are a person's counts as human however much of its prose an AI wrote. It is one of the detectors released with IdeaLens and trained on the same data. The idealens package (PyPI) runs the whole pipeline: it assigns each document one of the eight formats, extracts the outline with the prompt, role vocabulary and worked examples the detectors were trained with, and scores it with this model and the thresholds in this repo. Input is JSONL with a text field per document. To score outlines you already have, use idealens score outlines.jsonl -o scores.jsonl…
IdeaLens-ModernBERT-L-RolesOnly is an idea-level detector: it judges whose ideas a document contains, not who wrote its words, so a document whose ideas are a person's counts as human however much of its prose an AI wrote. It is one of the detectors released with IdeaLens and trained on the same data. The idealens package (PyPI) runs the whole pipeline: it assigns each document one of the eight formats, extracts the outline with the prompt, role vocabulary and worked examples the detectors were trained with, and scores it with this model and the thresholds in this repo. Input is JSONL with a text field per document. To score outlines you already have, use idealens score outlines.jsonl -o…
IdeaLens-ModernBERT-L-PerItem is an idea-level detector: it judges whose ideas a document contains, not who wrote its words, so a document whose ideas are a person's counts as human however much of its prose an AI wrote. It is one of the detectors released with IdeaLens and trained on the same data. The idealens package (PyPI) runs the whole pipeline: it assigns each document one of the eight formats, extracts the outline with the prompt, role vocabulary and worked examples the detectors were trained with, and scores it with this model and the thresholds in this repo. Input is JSONL with a text field per document. To score outlines you already have, use idealens score outlines.jsonl -o…
Non-autoregressive System 1 decision model, fine-tuned on the typed-decisions workflows: agent-trace observability, customer service, invoice processing and security incidents. Part of the Laya family. 400 test cases, 2,000 decisions, measured on the official test split. +3.9 points over Jev's published 0.727, above the 0.735 teacher ceiling, with 2.4x better Brier and 1.6x better score MAE. Jev figures are third-party published, not measured here — there is no TypeSafe API access in this project, and sample sizes and prompts differ. Treat the comparison as indicative. Router will not select this checkpoint automatically unless you construct it with autotaskdetection=True — it is…