Training small decision models for the SDLC
By Justin Poehnelt Published 16 min read

Most AI checks in software engineering do not need a chatbot. When a CI pipeline checks whether a pull request skips a test, triages a review-bot comment, or decides whether a coding agent is stuck in a retry loop, you want a typed verdict, a calibrated probability, and the offending line span, not three paragraphs of prose.
TypeSafe AI popularized this pattern with Jev (/v1/systemone), charging $0.042 per million input tokens with $0 output tokens across three typed primitives: noul (boolean probability), choice (categorical selection), and score (ordered rubric). Open-weight peers like Cloudflare’s Clef, Torchcast Decision, H2O-Lightning, and Perplexity’s pplx-decider followed with Apache-2.0 decision models ranging from 4B to 31B.
I wanted to see if a small open-weight model specialized for the SDLC could sit on the Pareto frontier against both 4B-31B generalist decision models and fast cloud LLMs without breaking general-domain performance. I called the project spawl (chipping away at decisions in the SDLC). Here is how the architecture works, what failed, and how all 14 models scored across three benchmarks.
Why causal attention stalls on diffs
My first runs fine-tuned strictly causal Qwen3 models with packed multi-question FlexAttention trees. They were fast, but they hit a ceiling on long-context contradictions. When a pull request description claims “read-only refactor” at token 40 and a diff hunk mutates state at token 950, every strictly causal 4B model I tested stalled near 70% accuracy.
Switching to bidirectional full-attention Qwen3.5 backbones (starting from Apache-2.0 decision peers like torchcast-ai/torchcast-decision-4b and h2oai/h2o-lightning-4b) lifted long-contradiction accuracy from 70% to 98%-100%.
Qwen3.5 uses a 3:1 hybrid layout: linear-attention GatedDeltaNet layers interleaved with full-attention layers (24 linear + 8 full on 4B; 18 linear + 6 full on 0.8B), a 262,144-token native context window, and an identical 248,320-token vocabulary across sizes. That shared layout gave me one serving design for both cloud and edge models:
- Single question (
Q == 1): Run non-causal full attention over[document + question]withattention_mask=NoneforO(T)Flash SDPA memory. On a4k-64khaystack test,spawl-4bheld100%(30/30) accuracy through63,279tokens while adding only+0.29 GBof resident memory from4kto64k. - Packed rubric (
Q >= 2): Encode the document once into aStage2Cache(caching the full-attention KV tensors plus the DeltaNet conv and recurrent states), then score allQquestion suffixes in one batched pass. On a Blackwell G4 GPU this runs 6-question packs in53.8 msat 512 tokens and109.0 msat 2,048 tokens (2.3xto4.9xfaster than 6-row batching) with0.00000000cross-question order drift.
I also tested why Qwen3.5’s 3:1 ratio matters. Turning 100% (36/36) of layers bidirectional on a dense Qwen3-8B collapsed representations completely (48.45% accuracy, 4.0% pair consistency). Keeping 75% (27/36) causal-anchored and making only 25% (9/36) periodic layers bidirectional rescued +17.0 pt. Causal anchoring keeps LoRA representations stable while periodic bidirectional layers handle cross-file comparison.
Four real bugs that only surfaced against git history
Every time I replaced clean synthetic checks with real git commits, long traces, or external rubrics, a concrete bug showed up:
- Long-context forgetting in DeltaNet decay gates. Tuning
in_proj_aandin_proj_bon< 1k-token examples shortened recurrent memory and dropped accuracy from96%at 2k tokens to52%at 16k tokens. Anchoringin_proj_aandin_proj_bback to base weights with L2 regularization at0.1xLR while mixing2k-16kagent traces fixed extrapolation through 64k tokens. On real36k-52ktraces,spawl-4bscored85.0%where livejev-1.14.0returnedHTTP 400 max_tokens_exceededon20/20items. - A
-2.5polarity framing skew. After adding my epistemic uncertainty head (needs_context_prob) and zero-latency 1-pass line pointer (0.33 ms, line-poolingdoc_hiddenonce during prefill), an early checkpoint predictedFalseon242of250counterfactual items. Pair ranking was still intact (93/125). The training set had phrasedgold = "true"as “clean/fixed” while eval phrasedgold = "true"as “buggy/reverted”. Balancing both polarities 50/50 and adding a paired-twin margin loss fixed it. - A file-count shortcut in missing-context detection. My first context-ablation set had two files on
75/75complete items and one file on75/75ablated items.spawl-0.8bmemorized file count (1.000in-domain AUROC,0.5375out-of-distribution). Rebuilding missing-context data into a 4-quadrant design (1-file complete, 2-file complete, 1-file missing, and 2-file with a decoy sibling file) forced file count and length to0.50AUROC and lifted0.8Bout-of-distributionneeds_contextAUROC to0.8922(0.9681on4B). - Ordinal scale mismatch on
scorerubrics. My first ordinal dataset used 5-level1..5scales with softkl_temp = 1.2, which dropped externalJevBench scoreaccuracy to40.0%by smearing level0predictions into level1. In practice,98.3%(229/233) of externalscorerubrics use a 0-indexed 4-level0..3scale (0 = none). Training on2,4000-indexed0..3items with sharp0-boundary targets (mean_p0 = 0.928,kl_temp = 1.0) fixed the collapse.
Architecture experiments that failed
Before scaling data, I ran controlled ablations on 95GB Blackwell G4 GPUs against a locked repo-disjoint val_600 harness. Three appealing ideas failed cleanly:
- Custom multi-module serving stacks. I built a 4-module prototype stack (
+21.19Mparams) and ran a frozen-recipe A/B against Pure 1-Pass on identical Blackwell G4s. Across4,215pooled items, they tied (78.88%vs78.91%, W/L102/103,p = 1.0000) while adding+15.6%latency and hurting prompt-injection defense (8.6%vs2.9%). I deleted all four modules and kept Pure 1-Pass. - Targeted Latent Adversarial Training. Adding 1-step PGD latent perturbations (
eps = 0.15) to middle full-attention layers[L11, L15, L23]on prompt-injection batches droppedval_scoreby-1.67 pt. Depth telemetry showed the readout head actively routed around those perturbed middle layers (< 0.9%combined attention) onto shallowL3andL7, confirming that middle layers carry semantic reasoning. - Muon optimizer on warm-started LoRA. Five-step Newton-Schulz Muon (
lr = 0.005) blew up skinny32x2560LoRA adapters immediately (loss = 4.52at step 25 vs1.43under AdamW2e-5) due to~9xaspect-ratio scaling.
What worked: Zero-Init Readout-DCA, 69k real OSS commits, and WiSE-FT
Three changes drove the final gains without adding serving latency.
1. Zero-Init Readout-DCA (0 ms latency tax, stock backbone)
Inspired by Google Research’s DeepCrossAttention (arXiv:2502.06785), I added a small depth-wise cross-attention module (DepthCrossAttnReadout) strictly inside the sidecar readout heads (3.30M params on 4B = 0.078% overhead; 531K params on 0.8B). Forward hooks capture only the full-attention layer outputs ([3, 7, 11, 15, 19, 23, 27, 31] on 4B; [3, 7, 11, 15, 19, 23] on 0.8B), apply per-tap RMSNorm, and compute 4-head input-dependent depth routing before adding W_o(ctx) to the final hidden state.
Initializing W_o = 0 and depth bias b_depth = [-6, ..., -6, 0] (99.7% weight on the final layer) guarantees exact 0.0000 step-0 parity and leaves the Qwen3.5 backbone 100% stock for Hugging Face and Apple Silicon MLX serving.
In a single-variable 35-minute A/B test on val_600, Zero-Init Readout-DCA won on every metric with zero latency cost:
Metric (val_600, 35m Blackwell G4) | Pure 1-Pass Baseline | + Zero-Init Readout-DCA | Delta |
|---|---|---|---|
val_score | 0.8135 | 0.8206 | +0.71 pt |
| Accuracy / Pair-both | 78.28% / 67.60% | 78.97% / 68.40% | +0.69 / +0.80 pt |
Calibration error (ECE) | 0.0424 | 0.0321 | -24% error |
Evidence Ev@3 | 95.52% | 95.86% | +0.34 pt |
L512 p50 latency (G4) | 32.51 ms | 31.84 ms | -0.67 ms (0 tax) |
Despite the -6.0 initial penalty against early layers, q * k pulled 50.1% of decision-token attention off L31 in 35 minutes: Head 0 specialized into mid-layer semantics (90.0% L15 + 10.0% L11), Head 2 specialized into early syntax (66.8% L7 + 31.3% L3), and Heads 1 and 3 stayed anchored on L31. On full-epoch runs, decision tokens pulled 75%-100% of depth attention off the final layer.
2. Mining 69,368 real execution-verified OSS commits ($0 API)
Synthetic LLM counterfactual pairs hit diminishing returns near 80.6% pooled accuracy. To break past that wall, I built zero-API git, OSV, and GitHub Actions miners across 1,641 eval-disjoint permissive repositories in 11 languages, harvesting 69,368 real execution-verified items (34,684 intact pairs, 0.49-0.52 GroupKFold TF-IDF, 0.500 length AUROC, 100% grounded line pointers):
30,808real bug-fix commits (18,726prod-code snapshots +12,082prod + regression-test pairs) and2,202real git reverts.8,840multi-file API and interface fixes,7,372SQL/DB migrations,2,188performance/memory-leak fixes, and1,774real auth/permission fixes.8,746real OSV/GHSA pre-patch vs post-patch security commits mined from293,965public advisories (strictly excluding every CVE and repo in eval),5,968dependency-breaking migrations, and1,470real red-to-green GitHub Actions commits.
Combined with earlier SDLC and Stackelberg prompt-injection data, the final audited training bundle holds 141,451 items.
3. Weight-space averaging (WiSE-FT 50/50)
Adding 69,368 real-OSS items lifted git/agent checks to 71.61% and completed a 7/7 SDLC lifecycle sweep (81.65%), but slightly diluted legacy long-context replay (-1.03 pt). Training a replay-balanced sibling run recovered legacy replay (89.46%) and drove coding-artifact prompt-injection bypass to 0.0% (0/35). Linearly averaging both checkpoints in weight space (50/50 LoRA + Readout-DCA heads on the same anchor, zero cross-term error) kept the best of both runs: 80.83% pooled, 71.61% git/agent, 0.0% coding PI bypass, 89.22% long-context, and 74.66% on withmartian/code-review-benchmark.
Benchmark 1: SWE-Decide across 14 decision models and LLMs
SWE-Decide spans 4,215 decidable items (4,380 total, strictly repo- and CVE-disjoint from training) across three slices:
- 7-stage SDLC lifecycle gates (
1,030items): 33 engineering gates covering intake, context/memory, agent harnesses, code review, security/API, CI/dependencies, and release/ops. - Zero-LLM-judge git and agent checks (
1,525items): Real bug-fix counterfactuals, reverted PRs, actionable inline review threads,16k-48kcross-file diffs, 4-quadrant context ablations, pre-tool safety, stop-hook tampering, and adversarial coding-artifact prompt injection. - Long-context and legacy regression suite (
1,660items): Contradictions, review-bot threads,2k-64kcoding-agent traces, and CI failure logs.
Every open-weight decision model ran its official Hugging Face inference code and bidirectional attention mask on a Blackwell G4 GPU. Every cloud LLM ran with strict JSON output and calibrated probabilities; non-thinking models ran with thinking disabled (0 reasoning tokens), while google/gemini-4-hydrogen enforces mandatory reasoning (1.17M reasoning tokens across the suite). Context overflows and blocked calls score 0 on the same 4,215 denominator.
Full SWE-Decide scoreboard (4,215 decidable items)
| Rank | Model | Type | Pooled 4,215 | SDLC 7-Stage (1,030) | ECE | Git & Agent (1,525) | Long & Legacy (1,660) | PI Bypass | Latency p50 | Cost / 1M in | vs spawl-4b (p) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | google/gemini-4-hydrogen | Thinking LLM (1.17M r-tok) | 83.53% | 83.59% | 0.104 | 74.23% | 92.05% | 14.3% | 2,925 ms | $2.08 | +2.70 pt (2.93e-5) |
| 2 | spawl-4b (WiSE 50/50) | 4B Decision | 80.83% | 80.97% | 0.027 | 71.61% | 89.22% | 0.0% | 31.8 ms | self-host (~$0.03) | baseline |
| 3 | Cloudflare/clef | 27B Decision | 79.98% | 80.19% | 0.065 | 69.64% | 89.34% | 54.3% | 168.6 ms | self-host (~$0.16) | -0.85 pt (0.212) |
| 4 | torchcast-decision-31b | 31B Decision (139 ovf) | 79.41% | 80.10% | 0.142 | 66.75% | 90.60% | 28.6% | 177.1 ms | self-host (~$0.18) | -1.42 pt (0.021) |
| 5 | anthropic/claude-sonnet-5.5 | Non-Think LLM | 79.10% | 81.07% | 0.030 | 67.02% | 88.98% | 20.0% | 1,458 ms | $2.27 | -1.73 pt (0.015) |
| 6 | anthropic/claude-haiku-5.5 | Non-Think LLM | 78.34% | 78.35% | 0.062 | 69.44% | 86.51% | 5.7% | 699 ms | $0.11 | -2.49 pt (3.09e-4) |
| 7 | torchcast-decision-4b | 4B Decision | 77.79% | 77.28% | 0.121 | 67.15% | 87.89% | 28.6% | 54.6 ms | self-host (~$0.045) | -3.04 pt (2.33e-8) |
| 8 | openai/gpt-6-luna | Non-Think LLM | 77.51% | 75.44% | 0.204 | 71.08% | 84.70% | 82.9% | 896 ms | $0.13 | -3.32 pt (1.93e-6) |
| 9 | jev-1.14.0 | Decision API (119 ovf) | 77.46% | 79.13% | 0.029 | 63.28% | 89.46% | 88.6% | 81.1 ms | $0.042 | -3.37 pt (1.25e-7) |
| 10 | h2o-lightning-4b | 4B Decision | 77.18% | 76.80% | 0.061 | 66.23% | 87.47% | 34.3% | 48.6 ms | self-host (~$0.04) | -3.65 pt (2.33e-9) |
| 11 | pplx-decider-flash-v1.3 | 4B Decision (124 ovf) | 76.63% | 77.48% | 0.111 | 63.93% | 87.77% | 11.4% | 311.9 ms | self-host (~$0.055) | -4.20 pt (4.37e-13) |
| 12 | Cloudflare/clef-flash | 9B Decision | 75.35% | 76.02% | 0.069 | 63.41% | 85.90% | 65.7% | 60.9 ms | self-host (~$0.07) | -5.48 pt (2.12e-16) |
| 13 | Intern-Decision-4B | 4B Decision (124 ovf) | 73.57% | 71.84% | 0.097 | 61.31% | 85.90% | 40.0% | 326.5 ms | self-host (~$0.055) | -7.26 pt (6.71e-28) |
| 14 | spawl-0.8b (WiSE MLX) | 0.8B Decision | 70.53% | 69.71% | 0.092 | 62.36% | 78.55% | 5.7% | 16.2 ms | offline | -10.30 pt (4.42e-43) |
Benchmark 2 and 3: Zero-contamination third-party suites
Because I authored SWE-Decide, the obvious question is whether spawl-4b simply overfit its own distribution. I ran two completely independent third-party suites after verifying 0 overlaps across all 141,451 training items (exact hashes, commit SHAs, and 100-120 char prefixes):
- Full Official
JevBench(JevBench/jevbench): All240cases /2,240questions (1,938known gold across 12 non-SDLC operational domains) plus the1,200-testjevbench-minimetamorphic coherence suite (REPrephrase,BATbatch invariance,MEAmeaningfulness,LOGlogical consistency,CHOchoice-set IIA), verified bit-exact (0.0000diff) againstJevBench/data/leaderboard.jsonl. - Official
PrimeVulPaired (ASSERT-KTH/PrimeVultest_paired):564real pre-patch vs post-patch C/C++ CVE function pairs (1,128functions across200OSS projects, zero CVE/project metadata exposed). Note: we caught and independently verified that theASSERT-KTH/PrimeVulHugging Face mirror inverted itsis_vulnerablecolumn relative to the paper’stargetlabel (proven bytest_unpairedclass ratios25,216/695, patched-function length asymmetry482/564, and manual inspection of real CVE diffs), so all 11 models are scored on verified ground truth.
Official JevBench (1,938 non-SDLC gold + 1,200 metamorphic tests)
| Model | Params | Acc (1,938) | Brier | LogLoss | ECE-10 | Overall (mini) | REP / BAT / MEA / LOG / CHO | vs spawl-4b |
|---|---|---|---|---|---|---|---|---|
torchcast-decision-4b | 4B | 91.43% | 0.1159 | 0.2449 | 0.0437 | 83.70% | 87.8 / 100.0 / 61.3 / 95.8 / 73.6 | p = 0.374 (tie) |
spawl-4b | 4B | 91.02% | 0.1305 | 0.2966 | 0.0959 | 76.03% | 79.2 / 100.0 / 51.0 / 91.7 / 58.3 | baseline |
Cloudflare/clef | 27B | 90.51% | 0.1237 | 0.2424 | 0.0333 | 75.41% | 82.2 / 65.8 / 64.0 / 90.0 / 75.0 | p = 0.407 (tie) |
jev-1.14.0 | API | 90.40% | 0.1341 | 0.5146 | 0.0319 | 83.29% | 83.9 / 94.2 / 64.0 / 96.7 / 77.8 | p = 0.261 |
h2o-lightning-4b | 4B | 89.53% | 0.1484 | 0.3144 | 0.0799 | 80.38% | 88.6 / 100.0 / 50.5 / 93.3 / 69.4 | p = 0.0065 |
Cloudflare/clef-flash | 9B | 87.93% | 0.1545 | 0.2989 | 0.0478 | 76.25% | 83.6 / 75.8 / 55.4 / 90.0 / 76.4 | p < 1e-6 |
spawl-0.8b | 0.8B | 80.03% | 0.2762 | 0.5014 | 0.0361 | 64.30% | 73.3 / 100.0 / 32.4 / 61.7 / 54.2 | p < 1e-6 |
Specializing on SDLC data did not lobotomize general-domain performance: spawl-4b (91.02%, Brier 0.1305) beats all 25 published official JevBench leaderboard baselines (highest published: OneJev-4B 89.22%, Open-Jev-9B 88.44%), statistically ties torchcast-4b, and edges 27B Cloudflare/clef on both accuracy and metamorphic overall. Metamorphic testing also surfaced a clear architectural difference: both Cloudflare/clef models leak cross-question state when questions are batched (BAT = 65.8% on 27B, 75.8% on 9B), while spawl’s prefix-cached design holds BAT = 100.0%.
Official PrimeVul Paired (564 real C/C++ CVE pairs)
| Model | Ovf | Soft Pair-Rank | Strict Pair-Rank | P-C (Both Right) | Acc | AUROC | ECE | Brier | vs spawl-4b (P-C p) |
|---|---|---|---|---|---|---|---|---|---|
torchcast-decision-31b (31B) | 6 | 61.26% | 40.43% | 10.46% | 54.26% | 0.5573 | 0.3037 | 0.3414 | p = 1.000 (tie) |
spawl-4b (4B) | 0 | 61.17% | 61.17% | 10.28% | 53.28% | 0.5523 | 0.0355 | 0.2492 | baseline |
jev-1.14.0 (API) | 0 | 56.12% | 47.16% | 3.01% | 50.53% | 0.5202 | 0.1783 | 0.2882 | p < 1e-6 |
claude-haiku-5.5 | 0 | 55.59% | 34.22% | 8.69% | 52.22% | 0.5344 | 0.2569 | 0.3214 | p = 0.407 |
gemini-4-hydrogen | 0 | 54.43% | 15.25% | 5.32% | 51.06% | 0.5409 | 0.0552 | 0.2587 | p = 0.0023 |
Cloudflare/clef (27B) | 0 | 53.37% | 52.84% | 4.43% | 51.33% | 0.5208 | 0.3254 | 0.3655 | p = 7e-5 |
gpt-6-luna | 0 | 53.37% | 37.94% | 11.17% | 53.63% | 0.5395 | 0.3952 | 0.4101 | p = 0.691 |
h2o-lightning-4b (4B) | 0 | 52.39% | 52.30% | 1.60% | 50.44% | 0.5069 | 0.2001 | 0.3009 | p < 1e-6 |
torchcast-decision-4b (4B) | 0 | 51.60% | 9.93% | 4.43% | 51.15% | 0.5137 | 0.2921 | 0.3352 | p = 1e-5 |
Cloudflare/clef-flash (9B) | 0 | 50.98% | 49.29% | 1.24% | 50.35% | 0.4963 | 0.3159 | 0.3662 | p < 1e-6 |
spawl-0.8b (0.8B) | 0 | 50.89% | 50.89% | 1.95% | 49.11% | 0.4957 | 0.1034 | 0.2639 | p < 1e-6 |
One forensic finding stood out while verifying torchcast-decision-4b and 31b: their bundled TorchcastDecision inference code hardcodes a noul_floor = 0.801 clamp that snaps any uncertain probability in (0.199, 0.801) to 0.199 or 0.801. On hard security functions, that creates 42%-83% probability ties and drives ECE above 0.29. Without that clamp, spawl-4b ties 7.75x-larger torchcast-31b on Soft Pair-Rank (61.17% vs 61.26%), beats 27B Cloudflare/clef by +7.8 pt (P-C p = 7e-5), and is the only model out of 11 with a Brier score below 0.250 (0.2492).
Where the results hold up and where they don’t
It is easy to overclaim from a big table. Here is what I think is genuinely meaningful and what is not:
- Domain-alignment advantage on
SWE-Decide: Even with strict repo-/CVE-disjoint splits and zero-LLM-judge git labels,spawlwas trained on SDLC task distributions whileClef,Torchcast,H2O, andSonnetran zero-shot. The honest conclusion is that domain post-training plus69kreal OSS commits lets a4Bmodel (31.8 ms) beat4B-9Bpeers and non-thinkingSonnet/Haiku/Lunaon SDLC work, not that4Bis generally smarter than27BorSonnet. spawl-4bvs27BCloudflare/clefaccuracy is not statistically significant (p = 0.21): The real edge over27BClefis matching it at6.75xfewer parameters,5.3xlower latency,0.0%vs54.3%coding PI bypass, and100%vs65.8%batch invariance.- No model solves isolated-function CVE detection:
53.3%raw accuracy and0.552AUROC onPrimeVulshow that neither a4Bmodel, a31Bmodel, nor thinkinggemini-4-hydrogen(51.1%acc,P-C 5.3%) can replace a repo-aware security scanner from a single function snippet alone. - Thinking System-2 still wins on raw accuracy:
gemini-4-hydrogenleadsspawl-4bby+2.70 pt(83.53%vs80.83%,p = 2.93e-5) by spending1.17Mreasoning tokens (2.9 s,$2.08/1M). A4Bsingle-pass model caps near~81%; the right production architecture is a fast System-1 filter escalating uncertain cases to System-2. - Two real
spawl-4bgaps to fix next: OnJevBenchmetamorphic tests,spawl-4btrailstorchcast-4bandjev-1.14.0on choice-set IIA (CHO 58.3%) and meaningfulness (MEA 51.0%), and its non-SDLCECE(0.096) is underconfident (Conf - Acc = -0.063). On unseen adaptive white-box prompt injection, attack success rate is still53.3%(40.0%on an earlier security-heavy checkpoint).
Offline Apple Silicon MLX (spawl-0.8b)
Stripping 453.7M unused vision parameters from Qwen/Qwen3.5-0.8B leaves 752.4M text parameters (0 visual or MTP keys). Quantizing to 4-bit MLX (q4, group size 64) with patched bidirectional full-attention layers [3, 7, 11, 15, 19, 23] and the 531K-param 6-tap Readout-DCA head fits in 404.4 MB + 4.65 MB heads and runs completely offline on Apple Silicon:
| Quantization | Size (weights + heads) | 512 tok (Q1 p50 / 6Q amortized) | 2,048 tok (6Q amortized) | 4,096 tok (6Q amortized) | Peak Metal RAM (512 tok) |
|---|---|---|---|---|---|
mlx_q4 | 404.4 + 4.65 MB | 16.22 ms / 4.47 ms/Q | 10.22 ms/Q | 20.38 ms/Q | 1.26 GB |
mlx_q8 | 762.9 + 4.65 MB | 20.81 ms / 4.58 ms/Q | 10.17 ms/Q | 20.39 ms/Q | 1.61 GB |
Distilling merged 35B-A3B + 4B logits with Readout-DCA lifted spawl-0.8b to 70.53% pooled on SWE-Decide, 80.03% on Official JevBench (ECE 0.036, BAT 100.0%), 56.11% on hard git counterfactuals (+2.27 pt above cloud jev-1.14.0), 75.24% Ev@3 line grounding, and 5.7% coding PI bypass, with +0.04 ms/Q Readout-DCA overhead and 0.0 cross-question order drift.
Scaling reality check: 35B-A3B MoE and System-2 cascades
To test whether a 3B-active sparse MoE or local test-time reasoning could add another +5%, I ran two experiments on 95GB Blackwell G4s:
Qwen/Qwen3.5-35B-A3B(35Btotal /3Bactive,10-tap Readout-DCA). Naive FP8 expert dequantization saved~60 GiBof BF16 weights in autograd and looped across active experts in Python (631.8 ms, OOMing95 GiB). Writing a custom_GroupedFP8LinearFunctionaround PyTorch 2.14’s native Blackwelltorch._grouped_mm(80launches instead of~16,000,0saved BF16 expert tensors) dropped VRAM to42.1 GiB, pushed GPU utilization to92%, and sped up training6.1xper step. After1,238steps,35B-A3Bbeat4BonJevBench score(55.00%), subtle single-file bug-fix counterfactuals (71.2%), multi-tenant authz (58.3%), andEv@3(98.5%), yet still ran11xslower than4B(358 msvs31.8 ms) and trailed converged4Boverall (77.82%vs80.83%). It works best as a$0-API teacher distilling20,000soft logits into4Band0.8B.- System-1-to-System-2 selective cascade (
20%deferral). LocalvLLM35B-A3Bthinking (2048t,2,411 tok/sagg) lifted generalist external sets (88.67%on our300-itemJevBenchslice,76.01%onwithmartian), while on specialized SDLC bugs domain-trained31.8 msspawl-4bstill beat zero-shot11.25 s35B-A3Bthinking. For a+3-5 ptleap on hard SDLC bugs, selective deferral needs a frontier System-2 model. Routing only20%of uncertainspawl-4bcases to System-2 sent29.6%of prompt tokens to System-2 (vs69.5%forjev-1.14.0, which overflows8.5%of long diffs), beating ajevcascade (70.21%vs67.66%) at44%lower blended cost ($1.34/1Mvs$2.39/1M) and63.2 msmedian latency (160xfaster than System-2 alone).
Drop-in compatibility with Jev
spawl exposes the same POST /v1/systemone endpoint supporting noul, choice, and Jev-native 0-indexed score criteria, with strictly additive fields (needs_context, needs_context_prob, and evidence_spans):
const BASE_URL = "https://api.spawl.dev"; // was https://api.typesafe.ai
const res = await fetch(`${BASE_URL}/v1/systemone`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SPAWL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "spawl-4b",
state: prDiffAndAgentTrace,
questions: {
skipped_test: {
type: "noul",
instructions: "Did the diff skip, delete, or weaken an existing test instead of fixing the bug?",
},
merge_risk: {
type: "score",
instructions: "Rate the production merge risk of this change.",
criteria: ["Trivial safe", "Low risk", "Moderate risk", "High blocking risk"],
},
bot_verdict: {
type: "choice",
instructions: "Classify the AI review bot thread on this hunk.",
options: ["real_bug", "resolved_fix", "nitpick_or_fp", "stale_comment"],
},
},
}),
});
const { answers, usage } = await res.json();
// answers.skipped_test -> { choice, noul, probabilities, needs_context, needs_context_prob, evidence_spans }spawl-4b and spawl-0.8b are built on Apache-2.0 Qwen3.5 backbones and permissively licensed open-source repositories. The zero-LLM-judge git/agent evaluation set (1,525 items) and the 69,368-item real-OSS training corpus use zero proprietary LLM labels; the targeted synthetic counterfactual slices and ordinal rubrics used direct Claude API generation and blind verification.
Total spend
Across the full project (including 17 controlled ablations, all 14 models on SWE-Decide, 11 models on PrimeVul Paired, 7 models on full Official JevBench, Qwen3.5-35B-A3B MoE runs, and vLLM sweeps):
- OpenRouter (early experiments, frontier System-2 study, and full 4,215-item LLM leaderboard sweeps):
~$234 - Anthropic API (targeted synthetic counterfactuals, ordinal rubrics, and direct
claude-sonnet-5.5benchmark completion):~$380($0.00spent on the69,368-item real-OSS corpus and$0.00on the zero-LLM-judge git/agent eval) - Live Jev baseline calls (across
SWE-Decide,JevBench, andPrimeVul): under$1.50 - Colab GPU compute (L4, A100, and 95GB Blackwell G4):
~1,200compute units (~$120)
Next up is fixing choice-set metamorphic invariance (CHO/MEA) and adaptive white-box prompt injection, then running an execution-verified SWE-bench Verified Best-of-N patch-reranking study.