Text Classification
PEFT
Safetensors
English
intent-classification
ecommerce
lora
qlora
function-calling
Run this model with HF Jobs
Run while-ai/ecommerce-1b 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/while-ai/ecommerce-1b. 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/while-ai/ecommerce-1b 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.
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
v0.1: gemma-3-1b QLoRA adapter + model card + rubric (private preview)
Browse filesFiles changed (6)
- .gitattributes+1
- README.md+56-37
- adapter_config.json+5-5
- adapter_model.safetensors+1-1
- prompt_template.txtAdded+143
- rubric.pngAdded
34 unmodified lines35363734 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -texteval_report.png filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text34 unmodified lines3536373834 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -texteval_report.png filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textrubric.png filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162---base_model: unsloth/gemma-3-1b-it-bnb-4bitlibrary_name: peftlicense: gemmapipeline_tag: text-generationlanguage:- entags:- intent-detection- agent-safety- behavioral-attestation- payments- ecommerce- finance- fintech- transactions- conversational- structured-output---# ZeroProof Ecommerce Intent 1B (v0)A QLoRA adapter over `gemma-3-1b` that reads a payment or ecommerce conversation and returns one structured intent object. It is the model side of ZeroProof's behavioral attestation stack: it decides what the user intended so a downstream layer can verify an agent's action against it. Small on purpose, so it can run on every transaction. This is v0, our first release.## What it doesIn: a conversation. Out: one intent object, the intent plus the fields that matter for it. It routes to one of 7 intents: `spend`, `send`, `exchange`, `recur`, `bill`, `reverse`, `none`. `none` is first class. In an attestation setting a false positive is a false attestation, so getting the no-action boundary right matters most.## ResultsScored against the frozen base on 4,000 held-out conversations, greedy decoding, both models in one engine. Core-type is reported macro (equal weight per intent).| Metric | Base gemma-3-1b | Model 0 ||---|---|---|| Valid output | 87.5 | 99.8 || Intent detected | 35.0 | 81.9 || Core-type (macro) | 14.4 | 70.0 |The base defaults to a single class. Model 0 routes across all seven.## MethodQLoRA SFT on a frozen, pinned `gemma-3-1b`, rank-16 adapter, 2 epochs, trained on Modal. Trained on ZeroProof's own conversation dataset: 6,000 train / 4,000 eval, balanced across the action intents, with near-duplicates removed so eval gains are not memorized.## Statusv0, first release, English. Next: a broader, harder eval, comparisons against peer 1B and frontier models, and more intents and domains.## Citation```bibtex@misc{zeroproof2026ecommerceintent,title = {ZeroProof Ecommerce Intent 1B},author = {ZeroProof},year = {2026},howpublished = {\url{https://huggingface.co/zero-proof-ai/ecommerce-intent-1b}}}```Built by [ZeroProof](https://www.zeroproofai.com/) · [zero-proof-ai](https://huggingface.co/zero-proof-ai)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081---license: gemmabase_model: google/gemma-3-1b-itlibrary_name: peftpipeline_tag: text-classificationtags:- intent-classification- payments- ecommerce- lora- qlora- function-callinglanguage:- en---# Ecommerce Intent 1B — v0.1A **1B-parameter** model that detects and classifies **payment intent turn-by-turn, live during a conversation**. Given the dialogue so far, it emits a single JSON object: whether the user has an actionable payment intent yet, which of seven types it is, and the extracted details.It is a **QLoRA fine-tune of `gemma-3-1b-it`**. The point is not to beat frontier models — it's to get a large fraction of frontier accuracy on this narrow task at **~1/1000th the parameters**, cheap and fast enough to call on *every* turn of *every* conversation.> **v0.1 · private preview.** Numbers are honest and reproducible; some intents are still weak (see Limitations) and are the target of the next data round.## What it doesSeven routing outcomes, each with its own detail schema:`spend` · `send` · `exchange` · `recur` · `bill` · `reverse` · `none``none` is the safety default — the model returns it while the user is *thinking about* a purchase and only commits to an action intent once the user actually decides. That deferral behavior is the core of "turn-by-turn": the intent can flip from `none` to an action mid-conversation, on the turn the user commits.## ResultsHeld-out eval: **1,977 conversations**, zero train/eval leakage, **macro-averaged** (equal weight per intent, so `none` cannot inflate the score). Every model below is scored **identically** — exact-match against gold. Frontier panel is a 412-row balanced subset of the same eval.| Metric (macro) | Base 1B | **This model** | GPT-5 | Sonnet 5 | Opus 4.8 ||---|---|---|---|---|---|| Valid JSON | 72.7% | **99.2%** | 100% | 96.1% | 100% || Intent detected | 54.9% | **74.9%** | 85.8% | 89.9% | 92.4% || **Correct core_type** | 12.1% | **70.0%** | 79.5% | 87.0% | 88.2% || Details filled | 1.8% | **44.3%** | 41.4% | 55.7% | 53.2% |- Core-type accuracy goes **12% → 70%** with fine-tuning — reaching **~88% of GPT-5** and **~80% of Opus** on this task, at a fraction of the size, cost, and latency.- On **details extraction it matches GPT-5** (44% vs 41%).- The eval contains **no easy rows** — every conversation is hard (negation/ambiguity) or long (16+ turns). This model scores **65%** on hard and **78%** on long slices (base: 18% / 11%).Per-intent core_type (this model): `none` 95 · `exchange` 73 · `reverse` 73 · `send` 70 · `recur` 68 · `bill` 57 · `spend` 55.## Usage```pythonfrom peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizerbase = AutoModelForCausalLM.from_pretrained("google/gemma-3-1b-it")tok = AutoTokenizer.from_pretrained("google/gemma-3-1b-it")model = PeftModel.from_pretrained(base, "zero-proof-ai/ecommerce-intent-1b")# Feed the conversation so far; the model emits one JSON object.```The system prompt and per-intent detail schemas are in the repo. Greedy decoding (`temperature=0`).## Training- **Base:** `gemma-3-1b-it`, 4-bit QLoRA via [unsloth](https://github.com/unslothai/unsloth).- **Data:** 13,282 label-blind role-play conversations, relabeled under a locked written policy and validated by a data gate (deduplicated by message signature, zero train/eval leakage). Deliberately `none`-heavy to mirror real traffic; macro-averaging keeps the reported score honest.- **Recipe:** 1 epoch, effective batch 16, LR 2e-4, seq len 12288 (long-context conversations fit). Loss plateaus by ~step 800; held-out accuracy confirms no memorization.## Limitations- **Weak on `spend` (55%) and `bill` (57%).** These are under-represented in training and are the explicit target of the v0.2 data round.- **Below frontier on routing.** This is a small, cheap model — use it where cost/latency matter and a ~10-point gap to GPT-5 is acceptable, not where you need frontier-max accuracy.- **v0.1, English only, payments domain.** Details extraction is partial (44%).## LicenseAdapter released under the base model's **Gemma** license terms. Eval set open-sourced separately for reproducibility.
33 unmodified lines3435363738394041424344454633 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["o_proj","up_proj","k_proj","gate_proj","q_proj","down_proj","v_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",33 unmodified lines3435363738394041424344454633 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["down_proj","k_proj","up_proj","gate_proj","v_proj","o_proj","q_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:afbe49354d5a6f59a97d8fed9de22d5c32dfa4704fcdab07f602bbcbfdd9fea0size 52231312123version https://git-lfs.github.com/spec/v1oid sha256:b2d3af00370ae02e4436df67ee0735157fb98e87e2c0e1fd90492adf99cf4203size 52231312
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143You review payment-assistant conversations and summarize the user's actionable request.
Read the verified conversation history and return exactly one JSON object.The JSON must include:- intent_detected: boolean- core_type: "spend", "send", "exchange", "recur", "bill", "reverse", or "none"- details: an object with fields appropriate to the core_type- confidence: number from 0.0 to 1.0- reason: one short sentence- source_message_seqs: list of user message seq numbers that support the result
Use only user messages as ground truth for intent. Assistant messages are contextfor offers, prices, availability, cart summaries, rates, and confirmation prompts.Use the latest amended values. Do not invent missing fields.
Choose the most specific committed action:- spend: buy/order/book goods or services from a merchant- send: transfer/pay back/tip/donate to a person, wallet, or recipient- exchange: swap/convert/buy/sell an asset or currency- recur: subscription, membership, renewal, auto-pay, or recurring payment- bill: pay a specific bill, invoice, statement, dues, or amount owed- reverse: refund, return, chargeback, dispute, cancellation, or undoing a prior payment- none: no actionable payment intent yet
Detect the user's intent even when details are incomplete or the request is notfully finalized, real people routinely omit, forget, or don't know some fields.Fill the detail fields you can infer from the conversation and use null for therest. A clear direction toward an action (buying, paying, sending money, swapping/converting, a bill, a refund or dispute, a subscription) IS that intent, evenwithout every field and even if the user never says an explicit "yes, do it".
Use core_type="none" ONLY when there is genuinely no actionable payment intent:pure browsing or comparing with no chosen action, general questions, chit-chat,checking a status/balance, or the user explicitly not trying to move money.Missing details alone do NOT make it "none".
For source_message_seqs, include only the user messages that directly support thefinal routed intent and latest details. Do not include every user message.
Return only valid JSON. No markdown, no commentary.
---- DETAIL SCHEMAS ----
Details object shapes:
spend details:{ "product_id": string|null, "product_name": string|null, "quantity": integer|null, "unit_price": number|null, "total_amount": number|null, "currency": string|null, "color": string|null, "size": string|null, "style": string|null, "variant": string|null, "service_type": string|null, "provider": string|null, "date_start": string|null, "date_end": string|null, "location": string|null, "guests": integer|null, "other": {}}
send details:{ "recipient_address": string|null, "recipient_name": string|null, "amount": number|null, "token": string|null, "chain": string|null, "memo": string|null, "is_donation": boolean, "cause": string|null, "organization": string|null}
exchange details:{ "action": "swap"|"buy"|"sell"|null, "source_token": string|null, "source_amount": number|null, "target_token": string|null, "target_amount": number|null, "target_type": string|null, "exchange_rate": number|null, "max_slippage": string|null, "platform": string|null}
recur details:{ "merchant": string|null, "plan_name": string|null, "billing_interval": "weekly"|"monthly"|"yearly"|"annual"|"one_time"|null, "amount": number|null, "currency": string|null, "trial": boolean|null, "start_date": string|null, "renewal_date": string|null, "payment_method": string|null, "action": "start"|"renew"|"upgrade"|"downgrade"|"cancel"|"change"|"autopay"|null, "other": {}}
bill details:{ "bill_type": string|null, "payee": string|null, "invoice_number": string|null, "account_number": string|null, "amount": number|null, "currency": string|null, "due_date": string|null, "payment_method": string|null, "other": {}}
reverse details:{ "action": "refund"|"return"|"chargeback"|"dispute"|"cancel"|"reverse"|null, "merchant": string|null, "product_name": string|null, "order_id": string|null, "transaction_id": string|null, "amount": number|null, "currency": string|null, "reason_code": string|null, "original_purchase_date": string|null, "other": {}}
none details:{ "non_payment_intent": "browse"|"ask_question"|"support"|"cart_view"|"edit_info"|"defer"|"missing_required_info"|"delivery_request"|"other", "payment_actionable": false, "user_goal": string|null}
Keep details simple and faithful to the conversation. Use explicit nulls forunknown values. Put extra structured attributes in other only when they matter..gitattributes+1
README.md+56-37
adapter_config.json+5-5
adapter_model.safetensors+1-1
prompt_template.txtAdded+143
rubric.pngAdded

Large File Pointer Details
- SHA256: 84a05fc25d213781746addc9ed72bee950492b8b335f320b275ffe9700ffee33
- Pointer size: 131 Bytes
- Size of remote file: 201 kB