gowtham0992 commited on
Commit
303b630
·
verified ·
1 Parent(s): df9258a

Draft Hugging Face article

Browse files
Files changed (1) hide show
  1. docs/huggingface-article-draft.md +222 -0
docs/huggingface-article-draft.md ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Jawbreaker: Private Scam Defense for Someone You Love
2
+
3
+ > Draft for Hugging Face Articles / community post.
4
+ >
5
+ > Status: working draft. Add demo video and final social links before publishing.
6
+
7
+ ![Jawbreaker logo](../jawbreaker_logo.png)
8
+
9
+ ## Short Version
10
+
11
+ Jawbreaker is a small-model scam defense app for people who need a clear answer before they click, reply, share a code, or send money.
12
+
13
+ Paste a suspicious text, email, or DM. Jawbreaker turns it into a simple safety card:
14
+
15
+ - the risk level
16
+ - the warning signs
17
+ - who the sender is pretending to be
18
+ - what they want
19
+ - what could happen
20
+ - the safest next step
21
+ - a copyable note to send to someone you trust
22
+
23
+ Live app: https://huggingface.co/spaces/build-small-hackathon/jawbreaker
24
+
25
+ Model: https://huggingface.co/build-small-hackathon/jawbreaker-minicpm5-1b-lora-v8
26
+
27
+ Dataset/eval bundle: https://huggingface.co/datasets/build-small-hackathon/jawbreaker-scam-defense-data
28
+
29
+ Collection: https://huggingface.co/collections/build-small-hackathon/jawbreaker-6a263632dcd0b6d41ca914ff
30
+
31
+ GitHub: https://github.com/gowtham0992/jawbreaker
32
+
33
+ ## Why We Built It
34
+
35
+ Most scam-defense tools explain scams after the fact. Jawbreaker is built for the moment before someone acts.
36
+
37
+ That moment is small but high stakes:
38
+
39
+ - a package fee link
40
+ - a fake bank callback
41
+ - a recruiter promising easy money
42
+ - a "new phone number" from a family member
43
+ - a verification code someone asks you to share
44
+
45
+ The product goal is not to be a general assistant. It is to help someone pause, understand the message, and choose one safe next step.
46
+
47
+ Jawbreaker is intentionally narrow:
48
+
49
+ 1. Read one suspicious message.
50
+ 2. Identify the scam risk and manipulation pattern.
51
+ 3. Explain the warning signs in plain English.
52
+ 4. Recommend one safe action.
53
+ 5. Help the user ask a trusted person to check it.
54
+
55
+ ## The Product Shape
56
+
57
+ The app is designed around a safety card, not a chatbot.
58
+
59
+ The reason is simple: scams use urgency. A chat interface can accidentally invite more back-and-forth. Jawbreaker should reduce decisions, not add more.
60
+
61
+ The current UI shows:
62
+
63
+ - a message input
64
+ - sample messages
65
+ - a verdict card
66
+ - a "Scam DNA" breakdown
67
+ - the safest next step
68
+ - a note that can be copied to someone trusted
69
+ - session-only history of checked messages
70
+
71
+ The app also asks users to remove passwords, account numbers, ID numbers, addresses, and personal codes before pasting. Jawbreaker is a safety aid, not legal, financial, or cybersecurity advice.
72
+
73
+ ## The Small Model
74
+
75
+ Jawbreaker uses a fine-tuned MiniCPM model:
76
+
77
+ - Base model: `openbmb/MiniCPM5-1B`
78
+ - Adapter: `build-small-hackathon/jawbreaker-minicpm5-1b-lora-v8`
79
+ - Training: PEFT/LoRA on Modal A100
80
+ - Runtime: Hugging Face ZeroGPU
81
+ - App: Gradio / Gradio Server
82
+
83
+ The 1B model matters. Scam defense is a focused task, so the product does not need a giant general-purpose model. It needs reliable structured output, low false negatives, and safe actions.
84
+
85
+ The model outputs strict JSON for the app renderer. Jawbreaker validates that JSON before rendering the safety card.
86
+
87
+ ## Defense in Depth
88
+
89
+ The model is not the only safety layer.
90
+
91
+ Jawbreaker uses a defense-in-depth pipeline:
92
+
93
+ 1. The small model generates structured scam analysis.
94
+ 2. The app parses the result as JSON.
95
+ 3. The schema validator checks required fields.
96
+ 4. A deterministic safety guard catches obvious high-risk patterns.
97
+ 5. If model output is invalid or weak, the app falls back to a safer deterministic analysis.
98
+
99
+ The app should never tell someone to click a suspicious link or call a number from the suspicious message. Safe actions point to official channels, known numbers, trusted apps, or a trusted person.
100
+
101
+ ## Training and Calibration
102
+
103
+ The final adapter is v8.
104
+
105
+ Earlier adapters helped prove that MiniCPM could produce the right JSON shape. Later passes focused on harder decision boundaries:
106
+
107
+ - package phishing
108
+ - bank and payment phishing
109
+ - family impersonation
110
+ - tech support scams
111
+ - fake job/recruiter scams
112
+ - prize and lottery scams
113
+ - wrong-number investment grooming
114
+ - benign family, school, pharmacy, and logistics messages that should not be overcalled
115
+
116
+ The v8 pass was failure-driven. We used eval results to find weak spots, then added targeted synthetic/sanitized calibration data and reran guarded evals.
117
+
118
+ The public dataset/eval bundle includes the training splits, eval files, and reports that support the final model decision.
119
+
120
+ ## Final Eval
121
+
122
+ Final guarded Modal A100 eval on the 632-case hard v8 suite:
123
+
124
+ | Metric | Result |
125
+ | --- | ---: |
126
+ | Cases | 632 |
127
+ | Risk accuracy | 579/632, 91.61% |
128
+ | Scam type accuracy | 561/632, 88.77% |
129
+ | Mean tactic recall | 90.69% |
130
+ | Dangerous as safe | 0 |
131
+ | Dangerous as needs_check | 0 |
132
+ | Safe as dangerous or suspicious | 0 |
133
+ | Unsafe action violations | 0 |
134
+ | Invalid predictions | 0 |
135
+ | Model errors | 0 |
136
+
137
+ The headline is not just accuracy. For this product, the most important result is zero dangerous undercalls on the final hard suite.
138
+
139
+ ## Why Not Just Use a Bigger Model?
140
+
141
+ Jawbreaker is a Build Small project. A bigger model could produce richer prose, but richer prose is not the goal.
142
+
143
+ The goal is:
144
+
145
+ - narrow task
146
+ - readable answer
147
+ - structured evidence
148
+ - safe next action
149
+ - small open model
150
+ - no external LLM API in the scam-analysis path
151
+
152
+ The small-model path also makes the product easier to reason about. The model is doing one job, and the app has deterministic checks around it.
153
+
154
+ ## What Worked
155
+
156
+ The biggest product decision was to stop treating this as "spam classification" and treat it as "family safety workflow."
157
+
158
+ Classification alone answers: "Is this spam?"
159
+
160
+ Jawbreaker answers:
161
+
162
+ - What is risky?
163
+ - How is the message pressuring me?
164
+ - What does the sender want?
165
+ - What should I do now?
166
+ - How can I ask someone I trust for help?
167
+
168
+ That shift made the UI, evals, training data, and safety guard much clearer.
169
+
170
+ ## What We Would Improve Next
171
+
172
+ The next steps are practical:
173
+
174
+ - record the demo video
175
+ - test with more sanitized real-world examples
176
+ - continue mobile polish
177
+ - add more recent scam patterns as held-out evals before training on them
178
+ - improve copy quality for the trusted-person handoff
179
+ - publish a short model/eval walkthrough for reproducibility
180
+
181
+ We would also like to keep collecting sanitized examples from public scam alerts and user-submitted messages where private details are removed.
182
+
183
+ ## Try It
184
+
185
+ Try Jawbreaker here:
186
+
187
+ https://huggingface.co/spaces/build-small-hackathon/jawbreaker
188
+
189
+ Good demo inputs:
190
+
191
+ ```text
192
+ USPS: Your package is held due to an unpaid fee. Verify now: http://usps-track-secure.example
193
+ ```
194
+
195
+ ```text
196
+ Hi Grandma, I lost my phone. This is my new number. Can you send $800 for rent today? Please don't tell Mom.
197
+ ```
198
+
199
+ ```text
200
+ Your dentist appointment is confirmed for Tuesday at 2:00 PM. Reply C to confirm or R to reschedule.
201
+ ```
202
+
203
+ The first two should produce scam warnings. The dentist appointment should show the false-positive boundary: not every official-looking message is dangerous, and not every short message is a scam.
204
+
205
+ ## Built With
206
+
207
+ - Hugging Face Spaces
208
+ - Gradio / Gradio Server
209
+ - OpenBMB MiniCPM5-1B
210
+ - PEFT/LoRA
211
+ - Modal A100 training and eval
212
+ - OpenAI Codex for implementation, eval design, UI iteration, and documentation
213
+
214
+ ## Links
215
+
216
+ - Space: https://huggingface.co/spaces/build-small-hackathon/jawbreaker
217
+ - Model: https://huggingface.co/build-small-hackathon/jawbreaker-minicpm5-1b-lora-v8
218
+ - Dataset/eval bundle: https://huggingface.co/datasets/build-small-hackathon/jawbreaker-scam-defense-data
219
+ - Collection: https://huggingface.co/collections/build-small-hackathon/jawbreaker-6a263632dcd0b6d41ca914ff
220
+ - GitHub: https://github.com/gowtham0992/jawbreaker
221
+ - Build notes: https://github.com/gowtham0992/jawbreaker/blob/main/FIELD_NOTES.md
222
+ - Codex evidence: https://github.com/gowtham0992/jawbreaker/blob/main/CODEX_JUDGE_EVIDENCE.md