--- license: apache-2.0 language: - en library_name: transformers pipeline_tag: text-classification base_model: Qwen/Qwen3.5-0.8B tags: - coding-agents - system-one - verification - long-context - gated-deltanet - calibration - counterfactual datasets: - DevMortimer/WardenS1-Bench --- # Warden-S1-752M (BF16 Reference) > **In plain English - what is Warden-S1 for?** Most AI models are slow *System-2* talkers. **Warden-S1** is a local *System-1* verification model with **its own `128K`-token context window** and a twist: in one instant reflex pass (`0` generated tokens), it outputs calibrated `Yes/No` probabilities, category `Choices`, and `Severity` scores to guard long-running AI coding agents (catching secret leaks from poisoned GitHub issues 70,000 tokens back or fake "all tests pass" claims). > > Cloud System-1 judges crash past their `~33K`-token ceiling (`HTTP 400`) and upload your private repo to a third-party API, while normal "small" `0.6B` local models secretly eat **`14.3 GiB` of KV RAM** when stretched to a `128K` window and freeze a 16 GB laptop on one chat. **Warden-S1** holds **10 concurrent long-context sessions at once in `858 MiB`** on your laptop (or `461 MiB` inside Chrome), beats commercial Cloud `Jev` (`96.1%` vs `84.9%` accuracy), admits *"I don't know"* at `0.50` instead of bluffing, **points straight to the exact guilty turn (`locus`, `93%` Top-1)**, and **scores which old turns are safe to compact (`salience`, `99.98%` AUROC)** so Warden-S1's `128K` window keeps tracking even when your main coding agent's session grows past `500K+` tokens. **Warden-S1-752M** is a `752M`-parameter, `128K`-context local System-One verification model for long-horizon coding agents, authored by **Ryan Joshua Z. Gapac** (ORCID `0009-0004-2591-0219`, DOI [`10.5281/zenodo.24494405`](https://doi.org/10.5281/zenodo.24494405), `mail@ryanjoshuagapac.com`, `https://ryanjoshuagapac.com/writing/warden-s1`). Built by surgically stripping the unused vision encoder (`100.6M` params) and multi-token prediction head (`20.5M` params) from Apache-2.0 `Qwen/Qwen3.5-0.8B` (`873.4M -> 752.4M`, exact `0.000000` logit parity), Warden-S1 pairs an **`18 Gated DeltaNet + 6 GQA`** hybrid backbone with five zero-decode verification heads (`noul`, `choice`, `score`, `locus`, `salience`). ## Stage 3.5 Verified Benchmarks Evaluated on held-out `WardenS1-Bench` (`4K-128K` tokens, zero repository overlap), 100-request stratified head-to-head against commercial Cloud `Jev`, and out-of-distribution `pi-warden` static benchmarks: | Benchmark / Metric | `Warden-S1-752M` (BF16 Cal) | `Warden-S1-752M-MLX-Q4` (`415.5 MiB`) | `Warden-S1-752M-ONNX-Int4` (`461.3 MiB`) | | --- | ---: | ---: | ---: | | Held-out `WardenS1-Bench` Noul AUROC (`4K-128K`) | **`0.9964`** | **`0.9957`** | **`0.9923`** *(36-state parity)* | | `80K-128K` Bucket Noul AUROC | **`0.9988`** | **`0.9947`** | `0.9923` *(overall)* | | Noul ECE / Abstention MAE | **`0.0126` / `0.0193`** | **`0.0175` / `0.0208`** | `0.0324` / `0.0%` overconf | | Choice Macro-F1 / Score Spearman rho | **`0.8726` / `0.8784`** | **`0.8726` / `0.8814`** | `0.7846` (`1.0000` agree) / `0.8927` | | Counterfactual Net Sensitivity | **`0.9174`** | **`0.9115`** | **`0.9259`** | | Locus Top-1 / Salience AUROC | **`0.9219` / `0.9998`** | **`0.9297` / `0.9998`** | `0.9167` / **`1.0000`** | - **BF16 vs. MLX-Q4 validation parity (`32` states / `352` Noul probes):** `0.00271` overall mean probability delta, `0.0183` Noul mean delta, `0.9844` Locus Top-1 agreement. - **NVIDIA A100 `O(Delta L)` turn speedup (`60K` cached + `2K` delta vs. cold `62K`):** **`18.92x`** (`157.6 ms` vs. `2,981 ms`). - **Companion quantized builds:** - Apple Silicon (`< 1 GiB` live Metal up to 10 concurrent sessions): `DevMortimer/Warden-S1-752M-MLX-4bit` (`415.5 MiB`) - Cross-platform Linux / Windows / Node / Browser WebGPU (zero PyTorch): `DevMortimer/Warden-S1-752M-ONNX-Int4` (`461.3 MiB`, 6 shards `<= 92 MiB`) ## Included Files - `modeling_warden_s1.py`: Vision-stripped text backbone loader with `O(Delta L)` hybrid state caching. - `heads.py`: Five calibrated zero-decode heads (`noul`, `choice`, `score`, `locus`, `salience`). - `prompts.py`: Structured trajectory chunking and probe formatting utilities. - `strip_vision.py`: Reproducible weight-surgery script verifying `0.000000` max logit diff. - `LICENSE`: Apache-2.0. ## Citation ```bibtex @misc{gapac2026wardens1, title = {Warden-S1: A Sub-1 GiB, 128K-Context Local System-One Verifier for Long-Horizon Coding Agents}, author = {Ryan Joshua Z. Gapac}, year = {2026}, url = {https://ryanjoshuagapac.com/writing/warden-s1} } ``` ## Citation ```bibtex @techreport{gapac2026wardens1, title = {Warden-S1: A Sub-1 GiB, 128K-Context Local System-One Verifier for Long-Horizon Coding Agents}, author = {Gapac, Ryan Joshua Z.}, year = {2026}, month = nov, institution = {Independent Research}, doi = {10.5281/zenodo.24494405}, url = {https://doi.org/10.5281/zenodo.24494405} } ```