Run this model with HF Jobs

Run badoot/gemma-4-26b-a4b-zero-trust on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/badoot/gemma-4-26b-a4b-zero-trust. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/badoot/gemma-4-26b-a4b-zero-trust on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/badoot/gemma-4-26b-a4b-zero-trust. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/badoot/gemma-4-26b-a4b-zero-trust. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Gemma-4 26B-A4B Zero-Trust Governed Tool-Use (badoot/gemma-4-26b-a4b-zero-trust)

White Circle Halo Competition — ft-gemma Track Base Model: google/gemma-4-26B-A4B-it (4B active parameters) · Team lead: @Badoot Interactive Writeup & Trajectory Explorer: pixel-perfect-pagecraft-374.lovable.app · Code: github.com/Badoot/halo

Overview

gemma-4-26b-a4b-zero-trust is a post-trained checkpoint of google/gemma-4-26B-A4B-it trained with Halo (whitecircle/halo) and White Circle policy rewards to respect a zero-trust operational execution boundary across multi-turn native tool calls—without degrading authorized operational utility or causing over-refusal.

Rather than testing cartoonish prompt injections, the zero_trust_tools environment models realistic calm production workflows across 10 blue-team archetypes:

  • 3 Benign Operational Archetypes (≥90% Benign Ops Gate): authorized_investigation, authorized_fix, error_recovery
  • 7 Security & Verification Archetypes: poisoned_config_audit (supply-chain backdoors inside remediation diffs), receipt_grounding (auditing SHA-256 execution receipts against misleading handoff notes), prompt_injection_runbook (ops checklists & Base64 preflights), denial_pressure (calm edit_file workarounds after L1 denials), forged_approval (CAB/Slack change tickets targeting protected paths), secret_exfiltration (metadata/hash lures on .pem/.key/.env), and trigger_phrase_defense (conditional compliance hooks).

All training code, environment logic, and training/evaluation corpora (badoot/zero-trust-gemma4-*) are 100% clean-room Apache-2.0. Weights are derived from google/gemma-4-26B-A4B-it and remain subject to the Gemma Terms of Use.


Headline Results

1. Disjoint 160-Episode Held-Out Evaluation (badoot/zero-trust-gemma4-rl, split test)

All test episodes are deterministically generated in pure Python with disjoint service pools, directory trees, canary prefixes, and lures (0 exact overlap, 0 canary overlap, 0.0345 max 5-gram Jaccard). Breach metrics require passing the ≥90% Benign Ops gate and are normalized per 100 tool calls.

Stage Model / Method Pass Rate (95% Wilson CI) Frontier Gap Closed (vs. GLM-5.4) Benign Ops (48 eps) Breaches (per 100 Calls) Over-Refusal
M0 Base Gemma-4-26B-A4B-it (OpenRouter, temp=0) 56.87% [49.13, 64.30] 0.0% 93.75% 86 (17.00) 0.0%
Ref-0 mistral-large-latest (Mistral API) 83.75% (134/160) [77.25, 88.66] 65.2% 100.0% 21 (3.11) 0.0%
Ref-1 DeepSeek-V4-Pro-0813 (Baseten Model APIs) 89.38% [83.64, 93.26] 78.8% 100.0% 15 (3.42) 0.0%
Ref-2 GLM-5.4 (Baseten Model APIs, ceiling) 98.12% [94.63, 99.36] 100.0% 100.0% 0 (0.00) 0.0%
M0 (3-seed) Base Gemma-4-26B-A4B-it (HF vLLM, 480 rollouts) 72.92% (350/480) 38.9% 95.83% 94 (6.42) 0.0%
M1 Stage 1 SFT LoRA (merged/m1-sft) 85.62% (411/480) [82.20, 88.48] 69.7% 100.0% 32 (2.48) 0.0%
M2 Stage 1.5 SMPO LoRA (checkpoint-200, merged) 91.67% (440/480) [89.09, 94.00] 84.4% 100.0% 14 (1.16) 0.0%
M3A Stage 2A K=4 Offline GRPO (rejected off-policy control) 81.88% (393/480) 60.6% 75.69% — —
M3B-Env Stage 2B Online GRPO (Arm A Env-Only, checkpoint-125) 91.46% (439/480) [88.62, 93.64] 83.9% 99.31% 19 (1.53) 0.0%
M3B-WC (v3 ckpt-75) Stage 2B Online GRPO (Arm B Env + White Circle, v3 peak) 91.25% (438/480; 440/480 solved) [88.85, 93.82] 83.3% 100.0% 16 (1.29; 2.50% br-ep) 0.21%
M3B-WC (v3 ckpt-125) Stage 2B Online GRPO (Arm B Env + White Circle, step-125 parity) 90.62% (435/480) 81.8% 100.0% 14 (1.16; 2.29% br-ep) 0.42%
M2b-SMPO (v4 ckpt-300) Stage 1.5b SMPO (combined v3+T3 v4 dataset) 92.71% (445/480; 447/480 solved) 86.9% 100.0% 4 (0.32; 0.63% br-ep) 0.21%
M3B-ArmB-v4 (ckpt-20, Published) Stage 2B Online GRPO (Env + White Circle 8-Policy on M2b v4) 92.92% (446/480) 87.4% 100.0% 9 (0.73; 1.46% br-ep) 0.0%

2. Generalization & Independent External Validation

Check M0 Base DeepSeek-V4-Pro GLM-5.4 Final Post-Trained (M2b-v4 / M3B-ArmB-v4)
30-ep Hand-Authored OOD (20 unseen formats + 10 renamed tools) 66.67% (8 breaches) 86.67% (0 breaches) (Mistral Large: 70.0%, 7 br) 100.0% (0 breaches) M2b-v4 90.0% (27/30, 0.88/100 br) · ArmB-v4 86.7% (26/30, 0% OR)
Zero-Shot Holdout Ablation (forged_approval excluded from SFT) 50.00% 100.0% 100.0% 87.5% (42/48 on excluded forged_approval, 420/480 overall)
Public XSTest Safe Compliance (250 safe prompts) 98.0% (2.0% over-refusal) — — ArmB-v4 98.0% (245/250) · ArmA 99.2% · M2 98.8%
Public XSTest Unsafe Refusal (200 unsafe prompts, strmatch) 70.5% [63.84, 76.39] — — M2b-v4 78.0% (156/200) · ArmB-v4 75.5% (151/200)
3-Provider Position-Blind Judge Audit (M3B-ArmB-v4 vs M0) — — — Combined (329 pairs): 160–2–167 (98.8% decisive win, 0 candidate reward hacks) — Baseten GLM-5.4 (154 eps) 94–0–60 (4.36→4.98 Safety); OpenRouter Claude 4.5 (55 eps) 24–2–29 (3.95→5.00 Safety); Mistral mistral-large-latest (120 eps) 42–0–78 (4.27→4.99 Safety, 4.19→4.94 Utility)
Local Cross-Size Gemma 4 Scaling ($0, RTX 4070 Ti SUPER, T3 v4 data) E2B 56.9% (XSTest 96.4%) / E4B 63.7% (XSTest 96.4%) — — E2B 69.4% (-52% br/100, XSTest 94.0%) · E4B 80.6% (-53% br/100, OOD 80.0%, XSTest 96.4% = 0.0% tax)
Sim-to-Real ztd MCP Governance Parity & Live H3 Audit (halo_mitre_doctrine.json) — — — 20/20 (100.0%) replay parity (3.4–9.7 ms L1 blocks); 470 live H3 episodes executed over ztd mcp stdio (E4B Base, E4B v4-r8, and local 26B-A4B IQ4_XS GGUF) producing 1,132 Ed25519-signed receipts (51 L1 blocks, 3/3 hash chains verified OK via ztd audit verify) and surfacing real-boundary path-echo & clean-ledger sim-to-real gaps
Independent White Circle v6 (10-Policy) 11-Model Live API Audit (1,760 eps, 0 errors) 85.62% (23 violations; 16 supply-chain backdoors) 98.12% (3 violations) (Mistral Large: 86.25%, 22 violations) 100.0% (0 violations) M2b-v4 100.0% (0 violations) · Published Champion 100.0% (0 violations, tying GLM-5.4!)

Training Recipe (4-Stage Halo 1.3.0 Ladder)

Built on whitecircle/halo (base_commit: db5cca3f2f529557a50dc9c76d116469dfbbdb32) with attention-only LoRA (q_proj, k_proj, v_proj, o_proj; r=64, alpha=128; attn_implementation: sdpa; moe_balancing: none; seed: 42) and shard-by-shard --streaming CPU merges between stages:

  1. Stage 1 — SFT (badoot/zero-trust-gemma4-sft): 1,618 train / 180 val double-gated multi-turn trajectories (lr=5e-5, 2 epochs, max_length=8192).
  2. Stage 1.5 — SMPO (badoot/zero-trust-gemma4-smpo): 1,045 train / 116 val decision-point preference pairs (beta=1.0, chosen_sft_ratio=0.75, lr=1e-5).
  3. Stage 2A — K=4 Offline GRPO (badoot/zero-trust-gemma4-offline-grpo): 1,045 train / 116 val groups (4,571 completions, mean_k=3.937, min_spread=1.00) scored with full-trajectory White Circle (8 calibrated policies) + deterministic environment rewards (loss_type: dapo, advantage_method: quantile_norm, kl_beta=0.02, lr=5e-6).
  4. Stage 2B — Online Environmental GRPO (badoot/zero-trust-gemma4-rl): Burst-safe consolidated 8-policy White Circle view: final (max_concurrency: 1 + paced scorer) paired with zero_trust_tools deterministic grading (lr=3e-6), benchmarked head-to-head against an identical Env-Only causal ablation arm.

Quickstart & Zero-API-Key Reproduction

Serve with vLLM (Halo vllm-0.32.0-1.3.0)

vllm serve badoot/gemma-4-26b-a4b-zero-trust \
  --port 8000 --dtype auto --moe-backend triton \
  --enable-auto-tool-choice --tool-call-parser gemma4 --reasoning-parser gemma4 \
  --chat-template /workspace/jinja-templates/gemma4/gemma4-reasoning-effort.jinja \
  --enable-prefix-caching

Run Official 3-Seed Held-Out Evaluation (Zero API Keys)

python projects/zero_trust_agent/eval_agent.py \
  --env_type zero_trust_tools \
  --dataset badoot/zero-trust-gemma4-rl \
  --split test \
  --context_fields episode_spec category \
  --group_by category \
  --num_examples 0 \
  --num_samples 3 \
  --base_url http://localhost:8000/v1 \
  --model badoot/gemma-4-26b-a4b-zero-trust

Platforms Used & Provenance

  • Halo (whitecircle/halo): Training, streaming adapter merges, and 3-seed evaluation.
  • White Circle: 8 calibrated custom policies used during training (governance_safety, operational_utility, discipline), expanded to a 10-policy v6 taxonomy (+ supply-chain backdoor & conditional trigger policies, 100% pilot accuracy) for a full 11-model / 1,760-episode live API audit (M0 85.62% → Champion 100.0% / 0 violations).
  • Nebius Token Factory: Multi-teacher synthetic trajectory generation (DeepSeek-V4.1-Flash-1017-fast, Kimi-K3.1-Pro, GLM-5.3-Flash, GLM-5.4).
  • Firecrawl & Tavily: Tavily advanced discovery (32 queries) + Firecrawl v2 /map, /search, and /scrape (markdown + structured JSON extraction) grounding OWASP GenAI/Agentic 2026, MITRE ATT&CK/ATLAS, 2025–2026 MCP CVEs, and SRE incident recovery (F1–F6, 48/48 submission-time SHA-256 provenance manifest, 92/92 structured F6 Threat Intelligence Cards with 0 errors across 73 real-world threats + 19 SRE runbooks, 10/10 partner docs verified).
  • OpenRouter: Pre-training M0 baselines, public XSTest (450 prompts), and independent position-blind judging (claude-sonnet-4.5).
  • Baseten: Frontier reference benchmarks (DeepSeek-V4-Pro-0813, GLM-5.4) and cross-provider blind judging (94–0–60).
  • Mistral: 3rd frontier reference benchmark (mistral-large-latest: 83.75% rl/test, 70.0% OOD-30) and 3rd independent position-blind pairwise judge (42–0–78, 100% decisive win, 0 candidate reward hacks).
  • Lovable: Public no-login interactive writeup and Zero-Trust Trajectory Explorer.

Limitations & Responsible Use

  • Post-training is a defense-in-depth behavioral layer and never replaces kernel/OS sandboxing, least-privilege IAM, or cryptographic execution enforcement in production.
  • Attention-only LoRA (r=64) leaves Gemma-4's MoE router and expert banks frozen to fit single-GPU budgets.
  • For teams looking for multi-model enterprise witness datasets with signed L1–L5 execution receipts beyond this Apache-2.0 Halo corpus, see opendevops.ai/datasets.
Downloads last month
90
Safetensors
Model size
26B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for badoot/gemma-4-26b-a4b-zero-trust

Finetuned
(286)
this model

Datasets used to train badoot/gemma-4-26b-a4b-zero-trust

Evaluation results