KinShield-Tiny v3
A 22M-parameter phone-call scam classifier (MiniLM-L6, int8 ONNX, 22.9 MB) built for KinShield, an entry in the AWS "Zero to Shipped" hackathon. It reads a call transcript and returns a score from 0 to 1 for each of KinShield's 7 warning signs, plus a HIGH-risk probability. It runs on CPU in about 40–80 ms.
What's new in v3: v3 was distilled from Solomonwilsonr/kinshield-20b, our fine-tuned gpt-oss-20b. v2 was distilled from the stock gpt-oss-20b.
It is live as a standalone API on AWS Lambda (arm64), separate from the main KinShield app: POST https://1zuklu0if8.execute-api.us-east-1.amazonaws.com/predict with {"transcript": "caller: ...\nvictim: ..."}.
Results: 63 hand-written benchmark calls (31 scams, 32 safe), none used in training
| Model | Correct | Scams rated HIGH | Scams rated LOW | Safe calls flagged |
|---|---|---|---|---|
| KinShield-Tiny v2 (teacher: stock gpt-oss-20b) | 57/63 | 25/31 | 4 | 0/32 |
| KinShield-Tiny v3 (teacher: KinShield LoRA gpt-oss-20b) | 60/63 | 28/31 | 2 | 0/32 |
Both runs use int8 ONNX. v3 still misses scam_016 (a Medicare card scam) and scam_019 (a Hinglish UPI "beta in trouble" call), which it rates LOW, and rates scam_014 MEDIUM.
The 7 signals
impersonation, emergency, secrecy, financial_request, payment_anomaly, authority_pressure, unusual_urgency. The 8th output is high_risk. KinShield maps it as HIGH if the probability is at least 0.5, MEDIUM if at least 0.25, and LOW otherwise.
Use
import numpy as np, onnxruntime as ort
from tokenizers import Tokenizer
SIGNALS = ["impersonation", "emergency", "secrecy", "financial_request",
"payment_anomaly", "authority_pressure", "unusual_urgency"]
sess = ort.InferenceSession("model.int8.onnx", providers=["CPUExecutionProvider"])
tok = Tokenizer.from_file("tokenizer.json"); tok.enable_truncation(max_length=256); tok.no_padding()
text = "caller: Grandma, it's me. I got arrested, please don't tell Mom.\ncaller: Buy $2,000 in gift cards and read me the codes."
e = tok.encode(text)
logits = sess.run(["logits"], {"input_ids": np.array([e.ids], dtype=np.int64),
"attention_mask": np.array([e.attention_mask], dtype=np.int64)})[0][0]
p = 1 / (1 + np.exp(-logits))
print("p_high", round(float(p[7]), 3), {s: round(float(p[i]), 2) for i, s in enumerate(SIGNALS)})
The input is one speaker: text line per turn, without timestamps.
Training
- Transcripts: 1,565 synthetic calls written by gpt-oss-20b on Amazon Bedrock. They cover scams, hard negatives (for example "don't tell Dad, it's a surprise party") and ordinary calls, in English and Hinglish. Calls that were near-duplicates of the test set were removed.
- Labels: produced by KinShield's fine-tuned gpt-oss-20b, using the live detector prompt and normalisation.
- Training: mean pooling with 8 sigmoid heads, 15 epochs, learning rate 8e-5, on an Apple M3 Pro (MPS). The model was then exported to ONNX and quantised to int8.
Limits
- Synthetic data only. All training data is synthetic and LLM-labelled. The test set is 63 calls written by the same team, so a single call moves accuracy by about 1.6 points.
- No quotes. The model outputs scores, not quoted evidence. KinShield's main detector always cites the exact words; this model is meant as a fast pre-filter or offline fallback.
- Text only. It handles English and Hinglish text. It has no audio input and doesn't detect voice cloning.
- Not a safety guarantee. It is a hackathon research prototype. Don't use it to make decisions about real people.
- Downloads last month
- 33
Model tree for Solomonwilsonr/kinshield-tiny-v3
Base model
nreimers/MiniLM-L6-H384-uncased