Run this model with HF Jobs

Run eppingt/Valrico-400M-v4 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 to fine-tune https://huggingface.co/eppingt/Valrico-400M-v4. 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/eppingt/Valrico-400M-v4 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.

Valrico-400M-v4: 8192-token typed-decision encoder (Strict Apache-2.0)

By Timothy Epping.

Valrico-400M-v4 is a 400M-parameter typed-decision encoder warm-started from eppingt/Valrico-400M-v2 (jhu-clsp/ettin-encoder-400m, ModernBERT architecture) on an audited Strict Apache-2.0 / permissive corpus (see license_manifest.json: zero NC, zero SA, zero GPL/LGPL, zero Twitter-ToS/Yelp/MSMARCO).

What changed over Valrico-400M-v2 / v3

  • Native 8,192-token context (max_len = 8192): Doubled from 4,096 in v2 (valrico.json), paired with query-aware long-record trimming (record_trim.py) when inputs exceed 8,192 tokens.
  • Broad daily-use & structured-reasoning gains: On the 9-domain daily-use panel (v9_beam_panel, n = 3,237), macro accuracy improves from 0.8343 (v2) to 0.8617, ECE-15 improves from 0.0735 to 0.0479, and Decision Index 0.3 on the virgin holdout (di03_holdout, n = 2,948) rises from 21.48 (v2) to 26.61 (+5.13 DI).
  • Audited Strict Apache-2.0 provenance: Warm-started only from Valrico-400M-v2 and permissive datasets listed in license_manifest.json, with US open-weights teachers (Google Gemma-4 31B/26B under Apache-2.0; NVIDIA Nemotron 3.5 Super & Ultra 550B under NVIDIA Open Model License).
  • Modular serving engine & Decision Index adapter bundled: Includes valrico.py, valrico_engine.py, di_engine.py, ops_router.py, record_trim.py, and fit_head.py supporting deterministic ops/date/tier routing (enable_ops_router=True), FieldPresenceGuard, WorkflowCalibrator, confidence/margin abstention, option-order symmetrization (symmetrize=True for 3+ option choice tasks), large-option-set chunking, and zero-truncation decision_index evaluation (ValricoV4Engine). (Note: v3's frozen-v2 order_extractor/ neural probe heads are intentionally omitted because v4 fine-tunes the encoder weights; use enable_ops_router=True for deterministic structured routing.)

How to use

Code written for valrico.py works unchanged (max_len = 8192), or use valrico_engine.py for routing, long-record trimming, 3+ option symmetrization, and missing-field guards:

from valrico import Valrico
from valrico_engine import FieldPresenceGuard, ValricoEngine, WorkflowCalibrator

# 1. Direct lightweight scorer
m = Valrico.load("eppingt/Valrico-400M-v4")
probs = m.decide(
    record="Ticket: MEA-75460\nCustomers affected: 85\nSeverity: High",
    question="Policy: P1 when 20 or more customers are affected. Which SLA level applies?",
    options=["P1", "P2", "P3", "P4"],
    record_type="Service desk ticket",
)

# 2. Full serving engine (deterministic ops router + 8192 trim + 3+ choice symmetrization + field guard)
eng = ValricoEngine.load(
    "eppingt/Valrico-400M-v4",
    enable_ops_router=True,
    symmetrize=True,          # applies only when len(options) >= symmetrize_min_options (default 3)
    trim_long_records=True,
    field_guard=FieldPresenceGuard(),
)

res = eng.decide(
    record="Request: REQ-901\nAmount: 450.00\nApprover: TBD",
    question="Policy: approve only when an assigned approver signed off. Approve?",
    options=["Approve", "Deny", "Cannot tell"],
    record_type="Approval request",
    workflow="approvals",
    abstain_index=2,
    required_fields=["approver", "amount"],
)
# res -> {"route": "abstain_missing_field", "answer": 2, "probs": ..., "margin": ..., ...}

For yes/no questions (qtype="noul"), pass options ["false", "true"] (canonical training order).

Offline / air-gapped usage

After downloading the repository once, Valrico-400M-v4 runs 100% locally with zero network egress. FieldPresenceGuard, ops_router, record_trim, and pre-fitted WorkflowCalibrator JSON files require no external API calls.


Evaluation Summary

1. Daily-use 9-domain panel (v9_beam_panel, n = 3,237)

Metric Valrico-400M-v2 Valrico-400M-v4 (engine_sym3) Valrico-400M-v4 (raw)
Macro accuracy 0.8343 0.8617 0.8616
Micro accuracy 0.8352 0.8638 β€”
ECE-15 (lower is better) 0.0735 0.0479 0.0506
Abstention macro 0.7243 0.7018 β€”
False abstain (lower is better) 0.0691 0.0536 β€”
Flip accuracy 0.8887 0.9017 (both 0.8392) β€”
Option shuffle accuracy β€” 0.8244 (cons 0.9794) β€”
Field-order accuracy β€” 0.8606 (cons 0.9637) β€”

Per-domain accuracy (v9_beam_panel, Valrico-400M-v4 engine_sym3 vs Valrico-400M-v2):

  • approvals: 0.6846 (v2 0.6000)
  • code_review: 0.8346 (v2 0.8425)
  • inbox: 0.9429 (v2 0.9286)
  • moderation: 0.8667 (v2 0.8963)
  • reasoning: 0.8429 (v2 0.5714; abstention 0.9615 vs 0.5385)
  • retrieval: 0.8188 (v2 0.8986)
  • security: 0.9507 (v2 0.9577)
  • support: 0.8571 (v2 0.8571)
  • tools: 0.9568 (v2 0.9568)

2. Official Full Decision Index 0.3 Suite (140,178 scoreable rows, 1 Γ— NVIDIA RTX PRO 6000)

Evaluated with the zero-truncation adapter di_engine.py (di_engine:ValricoV4Engine, max_tokens=8192, trim_long_records=False, enable_ops_router=True, auto_chunk_large_options=True, symmetrize=False, bf16 on 1 Γ— NVIDIA RTX PRO 6000 Blackwell Server Edition):

python -m decision_index pipeline   --engine di_engine:ValricoV4Engine   --edition 0.3   --option model=eppingt/Valrico-400M-v4   --compact --out runs/valrico-400m-v4
Metric Valrico-400M v1 Valrico-400M-v4 (di_engine)
Decision Index (balanced_skill) 15.53 26.94 (+11.41)
raw_index (balanced_raw) 35.96 45.07 (+9.11 pp)
breadth_skill 13.88 23.77 (+9.89)
Coverage (ok / unsupported / error) β€” 140,170 / 8 scoreable / 0 (140,297 / 323 raw incl. excluded)
Latency (1 Γ— RTX PRO 6000) β€” 8.8 ms median Β· 16.2 ms mean Β· 38.8 ms p95

Area breakdown (Valrico-400M-v4 full DI 0.3): retrieval 45.90% (raw 59.21%, cov 100.00%), tools 39.43% (raw 46.90%, cov 99.86%), language 28.34% (raw 49.79%, cov 99.91%), knowledge 9.08% (raw 30.09%, cov 99.98%), arts 8.71% (raw 39.95%, cov 99.99%).

3. Decision Index 0.3 Slices & Virgin Holdout (n = 2,000 / 2,948)

Suite Valrico-400M-v2 Valrico-400M-v4 (engine8192_sym3) Valrico-400M-v4 (engine8192_nosym)
di03_strat2000 (n = 2,000) 19.06 (raw 37.79) 27.30 (raw 44.52) 27.63 (raw 44.83)
di03_holdout (n = 2,948, virgin) 21.48 (raw 40.10) 26.61 (raw 45.17) β€”

di03_holdout area skill breakdown for Valrico-400M-v4 (engine8192_sym3): knowledge 0.0612, language 0.2879, retrieval 0.4473, tools 0.4025, arts 0.1273. Selected datasets on di03_holdout (skill / raw): BFCL 57.25 / 70.00%, ToolRet 46.65 / 53.75%, ContractNLI 30.71 / 52.09%, RAGTruth response-level hallucination 25.67 / 64.15%.

4. Enterprise structured gates (gates4_v3) & long-context (v6long_dev)

Benchmark Measured
gates4_v3 g1 (n = 11,425) 0.9125
gates4_v3 g4 (n = 8,552, ops router) 0.9758
gates4_v3 g4o (n = 6,013, adjacent ops) 0.9962
gates4_v3 g4oj (n = 900, false ops routes) 0 / 900
v6long_dev (n = 2,302, 4096 query-aware trim) 0.9066 (ground 0.8559, json 0.8890, nli 0.9627)
v6long_dev (n = 2,302, 7999 native untrimmed) 0.8988 (ground 0.8423, json 0.8791, nli 0.9613)

Limitations & recommended settings

  • Temperature scaling: Dev-fitted temperature_star = 0.745 is recorded in valrico.json for workflows wanting temperature-scaled probabilities; default Valrico.decide() / ValricoEngine.decide() outputs unscaled probabilities (T = 1.0).
  • Retrieval abstention trade-off: On the daily-use panel, retrieval is 0.8188 vs 0.8986 for v2 (abstain_retrieval = 0.1786). For strict abstention-sensitive retrieval workflows, enable FieldPresenceGuard and/or fit WorkflowCalibrator on k = 10–20 labelled examples.
  • Scope: English-only (8,192 token max context); policy rules should be stated in question; not intended for consequential or regulated decisions without human review.

License

Copyright (c) 2026 Timothy Epping. Released under the Apache License 2.0 (see NOTICE and license_manifest.json for full upstream and dataset attributions).

Downloads last month
21
Safetensors
Model size
0.4B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for eppingt/Valrico-400M-v4

Finetuned
(1)
this model