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
Model card: canonical macro-averaged results, output schema section, corrected method description and chart
Browse files
README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
---
|
| 2 |
license: gemma
|
| 3 |
base_model: google/gemma-3-1b-it
|
|
|
|
|
|
|
| 4 |
library_name: peft
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
tags:
|
|
@@ -18,7 +20,7 @@ language:
|
|
| 18 |
|
| 19 |
**Frontier-approaching e-commerce intent detection in a 1B model.** Given a live customer conversation, `zeroproof-ecommerce-1b` returns a single JSON object with the customer's payment intent and its structured details. It runs inline on live traffic, at a cost and latency where calling a frontier model is not an option.
|
| 20 |
|
| 21 |
-
On a hard, held-out benchmark it reaches **70
|
| 22 |
|
| 23 |
## Model Details
|
| 24 |
|
|
@@ -33,6 +35,7 @@ On a hard, held-out benchmark it reaches **70% exact-match core-intent accuracy,
|
|
| 33 |
### Model Sources
|
| 34 |
|
| 35 |
- **Repository:** https://huggingface.co/zero-proof-ai/zeroproof-ecommerce-1b
|
|
|
|
| 36 |
|
| 37 |
## Uses
|
| 38 |
|
|
@@ -46,7 +49,7 @@ English-language e-commerce and payments only. It is a narrow intent classifier,
|
|
| 46 |
|
| 47 |
## Bias, Risks, and Limitations
|
| 48 |
|
| 49 |
-
Trained and evaluated on synthetic role-play conversations
|
| 50 |
|
| 51 |
### Recommendations
|
| 52 |
|
|
@@ -62,13 +65,26 @@ model = AutoPeftModelForCausalLM.from_pretrained("zero-proof-ai/zeroproof-ecomme
|
|
| 62 |
tok = AutoTokenizer.from_pretrained("zero-proof-ai/zeroproof-ecommerce-1b")
|
| 63 |
```
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
## Training Details
|
| 68 |
|
| 69 |
### Training Data
|
| 70 |
|
| 71 |
-
The differentiator is the data. ZeroProof builds e-commerce intent training data as **randomized conversational simulations**: role-played customers with independently sampled personas, tones, financial situations, life stages, devices, and behaviors, including adversarial actors,
|
| 72 |
|
| 73 |
### Training Procedure
|
| 74 |
|
|
@@ -84,15 +100,16 @@ The differentiator is the data. ZeroProof builds e-commerce intent training data
|
|
| 84 |
|
| 85 |
### Testing Data, Factors & Metrics
|
| 86 |
|
| 87 |
-
Held-out eval of 1,977 conversations, zero train/eval leakage, macro-averaged (equal weight per intent), scored by exact match
|
| 88 |
|
| 89 |
### Results
|
| 90 |
|
| 91 |
-

|
| 66 |
```
|
| 67 |
|
| 68 |
+
Prompt it with the system prompt shipped in `prompt_template.txt` plus the conversation so far, and decode greedily (`temperature=0`).
|
| 69 |
+
|
| 70 |
+
### Output format
|
| 71 |
+
|
| 72 |
+
The model returns one JSON object per message:
|
| 73 |
+
|
| 74 |
+
```json
|
| 75 |
+
{"intent_detected": true, "core_type": "reverse",
|
| 76 |
+
"details": {"action": "refund", "merchant": "Amazon", "amount": 81.40, "reason_code": "scam"},
|
| 77 |
+
"confidence": 0.85, "reason": "Customer wants a refund on a suspicious charge.",
|
| 78 |
+
"source_message_seqs": [2]}
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
`core_type` is one of `spend`, `send`, `exchange`, `recur`, `bill`, `reverse`, or `none`, and each type carries its own `details` fields.
|
| 82 |
|
| 83 |
## Training Details
|
| 84 |
|
| 85 |
### Training Data
|
| 86 |
|
| 87 |
+
The differentiator is the data. ZeroProof builds e-commerce intent training data as **randomized conversational simulations**: role-played customers with independently sampled personas, tones, financial situations, life stages, devices, and behaviors, including adversarial actors, simulated turn by turn between two independently drawn models. Generation is label-blind (the generating models never see the intent schema), labels are assigned in a separate pass, and every candidate passes a structural data gate: deduplicated by message signature, with zero train/eval leakage.
|
| 88 |
|
| 89 |
### Training Procedure
|
| 90 |
|
|
|
|
| 100 |
|
| 101 |
### Testing Data, Factors & Metrics
|
| 102 |
|
| 103 |
+
Held-out eval of 1,977 conversations, zero train/eval leakage, macro-averaged (equal weight per intent), scored deterministically against gold: intent type by exact match, order details as the fraction of gold fields reproduced (partial credit per field). The frontier panel is scored on a 412-row balanced subset of the same eval.
|
| 104 |
|
| 105 |
### Results
|
| 106 |
|
| 107 |
+

|
| 108 |
|
| 109 |
+
- Fine-tuning takes intent-type accuracy from **12 to 70** (macro), landing at **88% of GPT-5's 79.5**.
|
| 110 |
+
- On structured detail extraction it **exceeds the full frontier panel**: 63 against Sonnet 5's 56, Opus 4.8's 53, and GPT-5's 41.
|
| 111 |
+
- On the no-action boundary it errs toward inaction: **4.2%** of true no-action conversations are marked actionable, with remaining errors concentrated in the safe direction (missed actions, not invented ones).
|
| 112 |
+
- No easy rows: every conversation is adversarial (negation, ambiguity) or long. The model holds **65** on the hard slice and **70** on the long slice, where the base scores 18 and 10.
|
| 113 |
|
| 114 |
## Technical Specifications
|
| 115 |
|