Brainsurged Open-Jev Qwen3.5-4B (veto-open-jev-v4-qwen3.5-4b)
Five-round open-weights engineering study combining Zero-Gradient Weight-Space Surgery, 13.3 min Synthetic Rank-16 LoRA training, and Jump-Forward llama.cpp CUDA Serving (libjev_jump.so) — adapting Qwen/Qwen3.5-4B for constrained-JSON decision tasks and evaluating it across four Jevlab task types (including newly authored post-freeze Microgrid dispatch cases with an exact dynamic-programming reference).
- Base Model:
Qwen/Qwen3.5-4B(4,659,865,088parameters, Apache-2.0) - Default Flagship Artifact (
main/v4):veto-open-jev-v4-qwen3.5-4b-Q4_K_M.gguf(2.59 GiB, SHA-256:5432aa0bde83ab1e9a0b927fb71b7d26b796b9239d6c34e658fa3874125af008) - Intervention (
v4):- Stage 1 — Synthetic Rank-16 LoRA Training:
1,320synthetic counterfactual state/objective examples (2epochs,166AdamW steps,27.9Madapter scalars =0.6113%,13.3 min4B LoRA phase within a33.2 minRound-4 campaign across both0.8Band4Bincluding conversion/verification; about$0.84reported for that SpotNVIDIA A100-40GBrun and about$15reported across selected Spot A100 experiment runs in Rounds 1–4 — not an all-in project or reproduction cost). Overlap check: no exact string matches were found against the214holdout strings checked; this is not a semantic-contamination or pretraining audit. - Stage 2 — Post-LoRA Zero-Gradient Roof Calibration (
torch.set_grad_enabled(False)): Closed-form null-skeleton prior subtraction (alpha_prior = 0.45), inverse temperature scaling (beta_temp = 0.85), and<think>loop verification (0.0%unclosed loops on calibration checks).
- Stage 1 — Synthetic Rank-16 LoRA Training:
- Archived Artifacts (
mainandv1–v5branches):- Round-6 Chessmaster (
v5branch & standalone repoAIHeikki/brainsurged-chessmaster-qwen3.5-4b): Surgical Mid+Upper Cortex (Layers 12..29) Rank-16 LoRA + Roof Calibration +serving_v6Exact-Leaf Branch-and-Bound decoder (80.83%onHoldout-Chessmaster-120,9/34vs10/34giveaways in the Stockfish 18 local pilot, and won1½–½againstJev 1.13.0in the live Cloud Run L4 rematch with24. Rb1#). - Branch
main/v4: Round-4 flagshipQ4_K_MGGUF +v1–v4.safetensorssurgical/LoRA delta patches (patches_and_attestations/) + Round-5 C++/CUDA Jump-Forward serving sources & build guide (serving_v5/) + internal round reports (reports/) and Jevlab/Microgrid evaluation records (reports/jevlab_evaluations/). - Branches
v1,v2,v3,v5: Historical and domain-specialized weight artifacts, patches, and attestations archived for inspection (specify the generation's exact.gguffilename when downloading; see layout table below).
- Round-6 Chessmaster (
Quickstart (Ollama / Stock llama.cpp / serving_v5)
Timing & Runtime Note: Brainsurged results labeled
Round-5used the customserving_v5/stack on Cloud RunNVIDIA L4. Historical rows labeledold stackused the earlierllama-serversetup.Jevused its own hosted API. These are not Ollama or local-device latency benchmarks.
1. Run Locally with Ollama (v4 Default)
ollama run hf.co/AIHeikki/brainsurged-open-jev-qwen3.5-4b
2. Run with Stock llama.cpp (llama-server) + Request-Side Schema Controls
Launch Server (--reasoning-budget 0 for System-1 JSON, or --reasoning-budget 128 for compact Micro-Blink):
llama-server \
--model veto-open-jev-v4-qwen3.5-4b-Q4_K_M.gguf \
--gpu-layers 99 \
--flash-attn on \
--jinja \
--reasoning-budget 0
Send a Per-Request Constrained-JSON Call (enable_thinking: false + response_format: json_schema):
(Stock llama-server usage example — separate from the custom serving_v5/ Cloud Run L4 timings below.)
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"temperature": 0,
"max_tokens": 256,
"chat_template_kwargs": {"enable_thinking": false},
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "customer_triage",
"strict": true,
"schema": {
"type": "object",
"properties": {
"buying_intent": {"type": "boolean"},
"urgency": {"type": "boolean"},
"team": {"type": "string", "enum": ["sales", "support", "billing", "other"]}
},
"required": ["buying_intent", "urgency", "team"],
"additionalProperties": false
}
}
},
"messages": [
{"role": "system", "content": "Return only the requested JSON."},
{"role": "user", "content": "Customer reports duplicate invoice #4821 and threatens immediate cancellation unless refunded today."}
]
}'
3. Round-5 Jump-Forward CUDA Serving (serving_v5/)
See serving_v5/README.md for the complete staging and Docker build guide (jev_jump_engine.cpp → libjev_jump.so + fast_gateway.py + models.json):
- Capabilities: Canonical BPE Token-Trie Jump-Forward JSON decoding, VRAM Hybrid (
KV+conv1d+GatedDeltaNet) prefix slot cloning (6immutable prefix slots), and persistentHTTP/1.1Keep-Alive +TCP_NODELAYon exactv4weights. - Build Prerequisites:
serving_v5/Dockerfileembeds both the4B(2,783,446,912B) and0.8B(541,903,872B)v4GGUFs insideserving_v5/models/and runssmoke_test_build.pyduringdocker build:cd serving_v5 python3 stage_models_from_hf.py docker build --platform linux/amd64 -t jevlab-serving-v5 .
Evaluations Across Four Jevlab Task Types (Cloud Run NVIDIA L4, Q4_K_M)
Evaluated in four Jevlab task types (Customer, Business, Rescue, and Microgrid). The Microgrid cases were newly authored after the model freeze and were not used for subsequent tuning; the earlier three-task suite was reused across development rounds. Full nonsecret evaluation records, traces, manifests, and simulator code are archived in reports/jevlab_evaluations/.
1. Frozen Three-Task Suite Across Rounds 1–5 (Customer, Business & 60-Step Rescue)
Source records: LIVE_RESULTS_ROUND5_2026-11-07.md, RESCUE_TRACES_ROUND5_2026-11-07.md, ROUND5_COMPARISON_2026-11-07.json.
| Model / Stack | Customer (36) | Business (24: Rev / Trust / Spend) | Single-Step Subtotal (60) | 60-Step Rescue (3) | Customer Mean E2E (p50 Gateway Engine) | Business / Rescue Mean E2E |
|---|---|---|---|---|---|---|
Jev 1.13.0 (Native hosted API, paired w/ R5) | 36/36 | 24/24 (8 / 8 / 8) | 60/60 (100.0%) | 2/3 (22 steps) | 178.2 ms (not exposed) | 179.3 ms / 193.0 ms |
4B v1 (0.0096% 0-Grad Roof Surgery) | 36/36 | 15/24 (7 / 7 / 1) | 51/60 (85.0%) | 1/3 (1-step exit) | 626.3 ms (old stack) | — |
4B v2 (0.0376% 0-Grad Mid+Roof Surgery) | 36/36 | 15/24 (7 / 6 / 2) | 51/60 (85.0%) | 0/3 (9-step exit) | 593.8 ms (old stack) | — |
4B v3 (0.0105% 0-Grad 3-Phase Roof) | 36/36 | 14/24 (7 / 6 / 1) | 50/60 (83.3%) | 1/3 (1-step exit) | 608.0 ms (old stack) | — |
4B v4 (0.61% LoRA + Roof, llama-server) | 36/36 | 22/24 (8 / 8 / 6) | 58/60 (96.7%) | 2/3 (20 steps) | 594.2 ms (old stack) | 609.6 ms / 649.1 ms |
4B v4 + Round-5 (libjev_jump.so Serving) | 36/36 | 22/24 (8 / 8 / 6) | 58/60 (96.7%) | 2/3 (22 steps) | 160.7 ms (93.6 ms) | 259.5 ms / 280.0 ms |
- Engine Timing Definition:
93.6 msp50 (95.6 msmean) on Customer,190.7 msp50 on Business, and201.6 msp50 on Rescue are gateway engine measurements (X-JevJump-Engine-Ms, including prompt preparation, cache cloning, and decoding), not isolated CUDA kernel timers. - Saved-State Replay Parity (
Round 5vsv4):116/117(99.15%) exact matches on4Band39/39(100%) on0.8B. One saved-state4Bdecision changed frommove_3tomove_1; the live mission still succeeded in22actions. The cause of the change was not isolated. BothJev 1.13.0and4B v4failed the constrainedAda-firstpriority rescue scenario at the 60-action limit (2/3).
2. Live UI Presets & Wording Sensitivity Check (12 Built-In Demos)
Source record: ui_demo_summary_2026-11-07.json.
- Matched outcomes: Customer labels
18/18vsJev18/18; Revenue€246,000vs€246,000; Trust100/100vs100/100;Escape(1action) andRescue everyone(22actions) passed;Ada-firstfailed at60actions for both. - Spend wording gap (
2.8×spend): Under the UI preset's ordinary phrasing ("Minimise operating spend this quarter."),4B v4selected the per-event minimum-spend option4/8times (€6,500spend;91trust,€136.5krevenue) versusJev's6/8(€2,300spend;50trust,€118krevenue). Small accuracy differences on counter-prior objectives can create large downstream financial consequences.
3. Fresh Post-Freeze Evaluation ("Microgrid" 4th Task Type: Jev vs 4B v4 vs 4B v1)
Source records: LIVE_RESULTS_MICROGRID_2026-11-07.md, LIVE_RESULTS_MICROGRID_V1_V4_2026-11-07.md, MICROGRID_TRACES_2026-11-07.md, MICROGRID_V1_TRACES_2026-11-07.md, microgrid_manifest.json, microgrid_simulation.py.
Evaluated after freezing weights and prompts across 24 newly authored 12-step battery/solar/grid dispatch episodes (288 actions per model). Brainsurged v1 and v4 used the identical Round-5 serving stack; Jev used its native hosted decision API. The saved Jev and v4 runs were compared with a later v1 run on the same frozen cases, and an exact dynamic-programming planner supplied the reference optimum for every scenario:
Metric (24 Episodes, 288 Steps) | Exact DP Reference | Jev 1.13.0 (Hosted API) | Brainsurged 4B v4 (Round-5) | Brainsurged 4B v1 (Round-5) |
|---|---|---|---|---|
| Valid structured responses | — | 288 / 288 | 288 / 288 | 288 / 288 |
| Exactly optimal full 12-step episodes | 24 / 24 (reference) | 3 / 24 | 0 / 24 | 0 / 24 |
| Best achievable critical service | 24 / 24 | 13 / 24 | 13 / 24 | 9 / 24 |
| Best achievable critical + optional service | 24 / 24 | 10 / 24 | 2 / 24 | 5 / 24 |
| Optimal actions from model's own reached state | 288 / 288 | 192 / 288 (66.7%) | 125 / 288 (43.4%) | 99 / 288 (34.4%) |
| Total avoidable critical shortfall (units) | 0 | 30 | 19 | 34 |
| Mean extra cost when matching planner service | 0 | +15.6 credits (n=10) | +78.0 credits (n=2) | (not reported) |
| Mean / Median E2E request latency | Not timed in frozen benchmark | 188.8 / 171.0 ms | 265.3 / 253.6 ms | 253.7 / 251.6 ms (separate run) |
Qualification & Scope:
- Optimal actions from each model's own reached state (
192/288vs125/288vs99/288) are consistent with the optimal remaining plan from each reached state; trajectories differed after divergent choices, so this is not a matched-state comparison. Conditional extra-cost means (n=10Jev vsn=2v4) cover different episode subsets. - Post-run descriptive comparisons under the fixed service-first priority order gave
Jev13–11overv4,Jev17–7overv1, andv415–9overv1(no ties). v4had less total critical shortfall (19vsJev's30andv1's34), whileJev(10/24) and evenv1(5/24) more often matched the full critical-plus-optional service objective thanv4(2/24). Some traces show wasteful final-interval charging or unused terminal battery. These observations do not establish the models' internal strategy, and neitherJev(3/24) nor Brainsurged (0/24) reliably planned full 12-step episodes.
Internal Holdout Progression (v0 → v1 → v2 → v3 → v4)
| Benchmark & Metric | Untuned v0 | v1 (0.0096% Roof) | v2 (0.0376% Mid+Roof) | v3 (0.0105% 3-Phase Roof) | v4 (0.61% LoRA + Roof) |
|---|---|---|---|---|---|
Holdout-240 Combined (Zero-Think JSON) | 95.84% | 95.00% | 95.41% | 95.84% | 100.00% (240/240) |
Adverse Policy 120 (Zero-Think JSON) | 91.67% | 90.00% | 90.83% | 91.67% | 100.00% (120/120) |
| ↳ Minimum-Spend vs Polite Lure | 87.50% | 85.42% | 89.58% | 85.42% | 100.00% |
Sequential Agentic 120 (Zero-Think JSON) | 100.00% | 100.00% | 100.00% | 100.00% | 100.00% (Brier=0.0000) |
Holdout-240 (Micro-Blink, <think> on) | Loops | 95.42% (0.1 tok) | — | 95.00% (13.9 tok) | 98.75% (36.7 tok, 0% loop) |
Generative Jev-180 (<think> on) | 0.56% (99.4% loop) | 86.67% (0 tok) | 83.89% (0 tok) | 85.56% (14.1 tok) | 95.00% (34.3 tok, 0% loop) |
Generative Math-40 (<think> on) | 0.00% (100% loop) | 17.50% (0 tok) | 57.50% | 5.00% (13.0 tok) | 72.50% (32.5 tok, 0% loop) |
Contributions Across the Five Rounds
- Zero-Gradient Weight Surgery (
v1–v3,0.0096%–0.0376%scalars edited,0gradient steps): In this study, roof surgery improved<think>completion behavior (99.4% → 0.0%unclosed loops onGenerative Jev-180) and scored36/36on Customer triage, while deeper mid-layer edits (v2) coincided with multi-step regressions (9-step escape) and short<think>budgets (v3) remained filled by Markdown preambles. - Hybrid LoRA + Roof Calibration (
v4,0.61%adapter): The broader decision-quality improvement on the frozen suite (Business14/24 → 22/24,Rescue1/3 → 2/3) and compact<think>formatting (Math-400% → 72.5%) followed the hybrid LoRA-plus-surgery round; these results do not isolate weight surgery as the sole cause. - In-Process Jump-Forward Serving (
Round 5): Reduced frozenCustomermean latency from594.2 msto160.7 ms(93.6 msp50 gateway engine) and reduced measuredBusiness(609.6 → 259.5 ms) andRescue(649.1 → 280.0 ms) mean latency by about2.3×while retainingv4weights. On the laterMicrogridevaluation, the same serving stack averaged265.3 ms(v4) and253.7 ms(v1); no earlier-stackMicrogridtiming was measured.
Repository Layout & SHA-256 Verification
| Branch / Path | Artifact | Size | SHA-256 |
|---|---|---|---|
main / v4 (root) | veto-open-jev-v4-qwen3.5-4b-Q4_K_M.gguf | 2.59 GiB | 5432aa0bde83ab1e9a0b927fb71b7d26b796b9239d6c34e658fa3874125af008 |
v3 branch (root) | veto-open-jev-v3-qwen3.5-4b-Q4_K_M.gguf | 2.59 GiB | 56e06632a5fa8682e3522ae831bbdb00c1740c98a6cd5190abc2c66a66b486f0 |
v2 branch (root) | veto-open-jev-v2-qwen3.5-4b-Q4_K_M.gguf | 2.59 GiB | ba42d86ce6a930cbd2fb231e5609b771aba572b8954a5390db921f8f60f8a449 |
v1 branch (root) | veto-open-jev-qwen3.5-4b-Q4_K_M.gguf | 2.59 GiB | 083fb0ffad8229aa0f497f7f69f56ff3ccd5e9968cafad3cd7a0d820b23743c4 |
main (patches_and_attestations/) | v1–v4 .safetensors deltas & JSON attestations | ~153 MiB | Archived bfloat16 surgical & LoRA deltas |
main (serving_v5/) | jev_jump_engine.cpp, fast_gateway.py, models.json, Dockerfile | ~345 KiB | Jump-Forward CUDA serving sources & staging guide |
main (reports/jevlab_evaluations/) | LIVE_RESULTS_*.md, traces, microgrid_manifest.json, microgrid_simulation.py | ~295 KiB | Archived Jevlab & Microgrid evaluation records |
Specify the exact .gguf filename when downloading a historical generation (v1–v3 branches were branched from main and also retain inherited v4 files):
hf download AIHeikki/brainsurged-open-jev-qwen3.5-4b veto-open-jev-qwen3.5-4b-Q4_K_M.gguf --revision v1
hf download AIHeikki/brainsurged-open-jev-qwen3.5-4b veto-open-jev-v2-qwen3.5-4b-Q4_K_M.gguf --revision v2
hf download AIHeikki/brainsurged-open-jev-qwen3.5-4b veto-open-jev-v3-qwen3.5-4b-Q4_K_M.gguf --revision v3
License & Attribution
Released under Apache-2.0, inheriting the license of Qwen/Qwen3.5-4B by the Qwen Team (Alibaba Cloud).