Text Classification
PEFT
Safetensors
English
intent-classification
ecommerce
lora
qlora
function-calling
Instructions to use while-ai/ecommerce-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use while-ai/ecommerce-1b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-3-1b-it-bnb-4bit") model = PeftModel.from_pretrained(base_model, "while-ai/ecommerce-1b") - Notebooks
- Google Colab
- Kaggle
Zero Proof AI commited on
Scrub recipe/schema from card; keep results + honest framing (v0)
Browse files
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
|
| 20 |
-
> that reads a payment/agent conversation and
|
| 21 |
-
>
|
| 22 |
-
>
|
| 23 |
|
| 24 |

|
| 25 |
|
| 26 |
-
Built by **[ZeroProof](https://www.zeroproofai.com/)** —
|
| 27 |
-
|
| 28 |
-
rubric; that's the part that compounds.
|
| 29 |
|
| 30 |
---
|
| 31 |
|
| 32 |
## What it does
|
| 33 |
|
| 34 |
-
**In:** a short user↔assistant conversation. **Out:**
|
| 35 |
-
|
| 36 |
-
Ground truth comes from the **user's** turns
|
| 37 |
|
| 38 |
-
**7 intents
|
| 39 |
-
`exchange` (swap/convert an asset) · `recur` (subscription/renewal) ·
|
| 40 |
-
specific bill) · `reverse` (refund/return/dispute) · `none` (no actionable
|
| 41 |
-
safety class; a false positive here is a *false attestation*,
|
|
|
|
| 42 |
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
-
## How well did the fine-tuning
|
| 48 |
|
| 49 |
Base and Model 0 scored in **one engine, on the identical 4,000 held-out conversations**
|
| 50 |
-
(greedy decoding,
|
| 51 |
|
| 52 |
| Metric | Base `gemma-3-1b` | **Model 0** | Δ |
|
| 53 |
|---|---|---|---|
|
| 54 |
-
| Valid
|
| 55 |
| Intent detected (act vs. `none`) | 35.0% | **81.9%** | +46.9 |
|
| 56 |
-
| **
|
| 57 |
-
|
|
| 58 |
|
| 59 |
*Macro = equal weight per intent (the honest headline; the eval is 57% `none`, so a
|
| 60 |
-
none-weighted
|
| 61 |
|
| 62 |
-
## Why this beats a base 1B — and why it'
|
| 63 |
|
| 64 |
The base model **doesn't fail randomly. It collapses to one class.** Across all 4,000 eval
|
| 65 |
-
conversations
|
| 66 |
-
|
| 67 |
-
|
| 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 |
-
|
| 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
|
| 89 |
-
|
| 90 |
|
| 91 |
-
- **Cost / latency / energy** — a self-hosted 1B is
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 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.
|
| 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`)
|
| 138 |
-
why
|
| 139 |
-
- **Rubric weaknesses we own:**
|
| 140 |
-
near-right extractions;
|
| 141 |
-
not a
|
| 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.
|
| 145 |
-
layer than raw accuracy
|
| 146 |
|
| 147 |
## Limitations
|
| 148 |
|
| 149 |
-
v0, single base family
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
long-context comparison is claimed yet (Model 1). Labels lean on LLM judgment.
|
| 153 |
|
| 154 |
## Links
|
| 155 |
|
| 156 |
-
-
|
| 157 |
-
|
| 158 |
-
-
|
|
|
|
| 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 |

|
| 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.
|