Zero Proof AI commited on
Commit
767e866
·
verified ·
1 Parent(s): c7f5d8a

Scrub recipe/schema from card; keep results + honest framing (v0)

Browse files
Files changed (1) hide show
  1. README.md +49 -85
README.md CHANGED
@@ -9,63 +9,60 @@ tags:
9
  - behavioral-attestation
10
  - payments
11
  - structured-output
12
- - qlora
13
- - lora
14
- - peft
15
  ---
16
 
17
  # ZeroProof Intent Model 0 — `v0`
18
 
19
- > **Status: v0 — first iteration, private preview.** A LoRA adapter over `gemma-3-1b`
20
- > that reads a payment/agent conversation and emits **one structured intent object**.
21
- > This is the model half of ZeroProof's behavioral-attestation stack: it decides *what
22
- > the user actually intended* so a downstream layer can verify an agent's action matches it.
23
 
24
  ![Model 0 evaluation](eval_report.png)
25
 
26
- Built by **[ZeroProof](https://www.zeroproofai.com/)** — an LLM fine-tuning lab building the
27
- trust layer for AI agents. This is our own data, our own training pipeline, and our own
28
- rubric; that's the part that compounds.
29
 
30
  ---
31
 
32
  ## What it does
33
 
34
- **In:** a short user↔assistant conversation. **Out:** one JSON object — `intent_detected`,
35
- `core_type`, a per-intent `details` object, `confidence`, `reason`, `source_message_seqs`.
36
- Ground truth comes from the **user's** turns only; assistant turns are context.
37
 
38
- **7 intents (`core_type`):** `spend` (buy from a merchant) · `send` (pay a person/wallet) ·
39
- `exchange` (swap/convert an asset) · `recur` (subscription/renewal) · `bill` (pay a
40
- specific bill) · `reverse` (refund/return/dispute) · `none` (no actionable intent — the
41
- safety class; a false positive here is a *false attestation*, our worst failure mode).
 
42
 
43
- This is **routing-then-extraction into a schema**, not one-word classification.
 
44
 
45
  ---
46
 
47
- ## How well did the fine-tuning actually work?
48
 
49
  Base and Model 0 scored in **one engine, on the identical 4,000 held-out conversations**
50
- (greedy decoding, zero train/eval leakage). Only the adapter differs.
51
 
52
  | Metric | Base `gemma-3-1b` | **Model 0** | Δ |
53
  |---|---|---|---|
54
- | Valid JSON | 87.5% | **99.8%** | +12.3 |
55
  | Intent detected (act vs. `none`) | 35.0% | **81.9%** | +46.9 |
56
- | **Core-type routing — macro** | **14.4%** | **70.0%** | **+55.6** |
57
- | Details score | 19.7% | **61.3%** | +41.6 |
58
 
59
  *Macro = equal weight per intent (the honest headline; the eval is 57% `none`, so a
60
- none-weighted micro number would flatter us — we don't report it as the headline).*
61
 
62
- ## Why this beats a base 1B — and why it's not luck
63
 
64
  The base model **doesn't fail randomly. It collapses to one class.** Across all 4,000 eval
65
- conversations, base predicted `spend` **80.7%** of the time — a `reverse` request, a
66
- status question, a "yo what's up" — all labeled `spend`. It can emit valid JSON (87.5%)
67
- but it **cannot route**: given the schema it latches onto the first/most-salient intent and
68
- marks nearly everything actionable.
69
 
70
  Fine-tuning teaches the two things the base lacks — **routing across all seven intents**
71
  and **the `none` boundary**:
@@ -80,53 +77,21 @@ and **the `none` boundary**:
80
  | spend | 300 | 84 | 63 |
81
  | recur | 300 | 0 | **59** |
82
 
83
- (`spend` is the *only* column where the base looks good — because it guesses `spend` for
84
- everything. Model 0 trades that false strength for real coverage of all seven.)
85
 
86
  ## Why a fine-tuned 1B instead of calling the frontier model?
87
 
88
- This model runs in the **hot path of every agent transaction**. Against the frontier parent
89
- (Opus-class), the argument is **economic and operational**, not "we're more accurate":
90
 
91
- - **Cost / latency / energy** — a self-hosted 1B is orders of magnitude cheaper and faster
92
- per call than a frontier API. Attestation only works if you can afford to run it on
93
- *every* action.
94
- - **Self-hostable & pinned** — a fixed adapter version you control, no external dependency
95
- in the trust path.
96
- - **Accuracy vs. the parent** — this is the **next milestone (Model 1)**, measured on this
97
  exact eval. We do **not** claim to beat the parent on accuracy in v0; we claim to close
98
- enough of the gap to be worth running everywhere. The honest comparison bars go here when
99
- we run them.
100
-
101
- ---
102
-
103
- ## Usage
104
-
105
- ```python
106
- from peft import PeftModel
107
- from transformers import AutoModelForCausalLM, AutoTokenizer
108
-
109
- base = "unsloth/gemma-3-1b-it-bnb-4bit"
110
- tok = AutoTokenizer.from_pretrained(base)
111
- model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
112
- model = PeftModel.from_pretrained(model, "zero-proof-ai/intent-model-0") # this adapter
113
-
114
- # prompt = system (intent schema) + the conversation; model returns the intent JSON
115
- ```
116
-
117
- Served in production as an OpenAI-compatible vLLM endpoint (base + adapter loaded together).
118
-
119
- ## Training
120
-
121
- - **Method:** QLoRA SFT (rank-16 adapter, response-only supervision) on a frozen,
122
- pinned `gemma-3-1b` snapshot. 2 epochs, effective batch 16. Trained on Modal.
123
- - **Data:** 6,000 train / 4,000 eval, carved from a 13k label-blind distillation corpus.
124
- Conversations are generated by a **two-agent role-play** where the models never see the
125
- intent taxonomy, the JSON schema, or the word "classification" — so transcripts read
126
- human, not schema-shaped. Generation and labeling are **separate passes**; labels come
127
- from a tiered LLM-judge protocol (no regex/keyword filters). Near-duplicates removed
128
- (MinHash-LSH) so eval gains aren't inflated. *Training data is proprietary; a hard,
129
- balanced eval set will be released as an open benchmark.*
130
 
131
  ---
132
 
@@ -134,25 +99,24 @@ Served in production as an OpenAI-compatible vLLM endpoint (base + adapter loade
134
 
135
  *(We publish these because the thinking is the product.)*
136
 
137
- - **Noticed:** the base's failure is *structured* (collapse-to-`spend`), which is exactly
138
- why routing supervision moves the needle so much.
139
- - **Rubric weaknesses we own:** `details_score` is a strict exact-match and under-credits
140
- near-right extractions; `confidence` is currently a teacher artifact (spikes on `0.95`),
141
- not a calibrated signal — treat it as such.
142
  - **What we're watching next (attestation metrics, not accuracy bars):** how often the
143
  model catches a **human switching intent mid-conversation**, and how often it correctly
144
- flags **"this needs verification"** before an action fires. These matter more for a trust
145
- layer than raw accuracy, and they're built on our own data + rubric.
146
 
147
  ## Limitations
148
 
149
- v0, single base family, **synthetic** training data (inherits teacher blind spots).
150
- Weakest intents are `recur` (59) and `spend` (63) — the status-vs-action and
151
- purchase-vs-defer boundaries — which the next data wave targets. No frontier/peer or
152
- long-context comparison is claimed yet (Model 1). Labels lean on LLM judgment.
153
 
154
  ## Links
155
 
156
- - Whitepaper (draft): *Label-Blind Distillation and Honest Evaluation for 1B-Scale
157
- Payment-Intent Detection*
158
- - Org: [Zero Proof AI](https://huggingface.co/zero-proof-ai) · [zeroproofai.com](https://www.zeroproofai.com/)
 
9
  - behavioral-attestation
10
  - payments
11
  - structured-output
 
 
 
12
  ---
13
 
14
  # ZeroProof Intent Model 0 — `v0`
15
 
16
+ > **Status: v0 — first iteration, private preview.** A compact adapter over `gemma-3-1b`
17
+ > that reads a payment/agent conversation and returns **one structured intent object**.
18
+ > It is the model half of ZeroProof's behavioral-attestation stack: it decides *what the
19
+ > user actually intended* so a downstream layer can verify an agent's action matches it.
20
 
21
  ![Model 0 evaluation](eval_report.png)
22
 
23
+ Built by **[ZeroProof](https://www.zeroproofai.com/)** — a lab building the trust layer for
24
+ AI agents. The data, the training, and the rubric are ours; that's the part that compounds.
 
25
 
26
  ---
27
 
28
  ## What it does
29
 
30
+ **In:** a short user↔assistant conversation. **Out:** a single structured intent object —
31
+ the detected intent, whether it's actionable, the salient details for that intent, and a
32
+ confidence signal. Ground truth comes from the **user's** turns; assistant turns are context.
33
 
34
+ It routes to one of **7 intents:** `spend` (buy from a merchant) · `send` (pay a
35
+ person/wallet) · `exchange` (swap/convert an asset) · `recur` (subscription/renewal) ·
36
+ `bill` (pay a specific bill) · `reverse` (refund/return/dispute) · `none` (no actionable
37
+ intent — the safety class; a false positive here is a *false attestation*, the worst
38
+ failure mode). This is **routing-then-extraction**, not one-word classification.
39
 
40
+ *(The exact output schema and integration spec are part of the ZeroProof runtime and are
41
+ not published here — reach out for access.)*
42
 
43
  ---
44
 
45
+ ## How well did the fine-tuning work?
46
 
47
  Base and Model 0 scored in **one engine, on the identical 4,000 held-out conversations**
48
+ (greedy decoding, de-duplicated so nothing leaks from training). Only the adapter differs.
49
 
50
  | Metric | Base `gemma-3-1b` | **Model 0** | Δ |
51
  |---|---|---|---|
52
+ | Valid structured output | 87.5% | **99.8%** | +12.3 |
53
  | Intent detected (act vs. `none`) | 35.0% | **81.9%** | +46.9 |
54
+ | **Intent routing — macro** | **14.4%** | **70.0%** | **+55.6** |
55
+ | Detail extraction | 19.7% | **61.3%** | +41.6 |
56
 
57
  *Macro = equal weight per intent (the honest headline; the eval is 57% `none`, so a
58
+ none-weighted average would flatter us — we don't report it as the headline).*
59
 
60
+ ## Why this beats a base 1B — and why it isn't luck
61
 
62
  The base model **doesn't fail randomly. It collapses to one class.** Across all 4,000 eval
63
+ conversations it predicted `spend` **80.7%** of the time — a refund request, a status
64
+ question, a "yo what's up," all called `spend`. It can produce well-formed output but it
65
+ **cannot route**: it latches onto one intent and marks nearly everything actionable.
 
66
 
67
  Fine-tuning teaches the two things the base lacks — **routing across all seven intents**
68
  and **the `none` boundary**:
 
77
  | spend | 300 | 84 | 63 |
78
  | recur | 300 | 0 | **59** |
79
 
80
+ `spend` is the *only* column where the base looks good — because it guesses `spend` for
81
+ everything. Model 0 trades that false strength for real coverage of all seven.
82
 
83
  ## Why a fine-tuned 1B instead of calling the frontier model?
84
 
85
+ This model runs in the **hot path of every agent transaction**. Against a frontier
86
+ parent, the case is **economic and operational**, not "we're more accurate":
87
 
88
+ - **Cost / latency / energy** — a self-hosted 1B is far cheaper and faster per call.
89
+ Attestation only works if you can afford to run it on *every* action.
90
+ - **Self-hostable & pinned** — a fixed version you control, no external dependency in the
91
+ trust path.
92
+ - **Accuracy vs. the parent** — that's the **next milestone (Model 1)**, measured on this
 
93
  exact eval. We do **not** claim to beat the parent on accuracy in v0; we claim to close
94
+ enough of the gap to be worth running everywhere.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  ---
97
 
 
99
 
100
  *(We publish these because the thinking is the product.)*
101
 
102
+ - **Noticed:** the base's failure is *structured* (collapse-to-`spend`) — which is exactly
103
+ why teaching it to route moves the needle so much.
104
+ - **Rubric weaknesses we own:** detail scoring is strict exact-match and under-credits
105
+ near-right extractions; the confidence field isn't calibrated yet — treat it as a rough
106
+ signal, not a probability.
107
  - **What we're watching next (attestation metrics, not accuracy bars):** how often the
108
  model catches a **human switching intent mid-conversation**, and how often it correctly
109
+ flags **"this needs verification"** before an action fires. Those matter more for a trust
110
+ layer than raw accuracy.
111
 
112
  ## Limitations
113
 
114
+ v0, single base family. Weakest intents are `recur` (59) and `spend` (63) — the
115
+ status-vs-action and purchase-vs-defer boundaries — which the next iteration targets. No
116
+ frontier/peer or long-context comparison is claimed yet (Model 1).
 
117
 
118
  ## Links
119
 
120
+ - **ZeroProof** — [zeroproofai.com](https://www.zeroproofai.com/) ·
121
+ [huggingface.co/zero-proof-ai](https://huggingface.co/zero-proof-ai)
122
+ - Technical report (v0): *Honest Evaluation for 1B-Scale Payment-Intent Detection* — coming soon.