Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
base_model: CohereLabs/tiny-aya-fire
|
| 4 |
+
base_model_relation: finetune
|
| 5 |
+
language: [en, hi, bn, ta, mr]
|
| 6 |
+
tags: [safety, prompt-injection, on-device, agents, safetune, curatorkit, auditkit, tiny-aya, sandesh]
|
| 7 |
+
datasets: [ashank-crazy/sandesh-bench-final, ashank-crazy/sandesh-bench]
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Tiny Aya Fire, Sandesh v2.1: an SMS assistant a scam text can't hijack
|
| 11 |
+
|
| 12 |
+
`CohereLabs/tiny-aya-fire` fine-tuned (LoRA, merged) to act as an on-device SMS-inbox assistant that **does the user's task and
|
| 13 |
+
ignores, and flags, instructions hidden in scam messages**, including over a multi-turn conversation and when the
|
| 14 |
+
user hands over control ("take care of whatever is urgent").
|
| 15 |
+
|
| 16 |
+
How it was built (Lexsi stack): CuratorKIT curated each training set → SafeTune trained three LoRA steps, each
|
| 17 |
+
merged before the next → AuditKIT scored every run (paired bootstrap, `agent_eval` on the multi-turn episodes).
|
| 18 |
+
1. **PlainSFT** on SandeshBench's train split (single turn; round 1).
|
| 19 |
+
2. **v2**: multi-turn patch. 1,000 fresh 2- and 3-turn episodes (follow-up scam at turn 2, delegation at turn 3)
|
| 20 |
+
+ 500 round-1 rows replayed.
|
| 21 |
+
3. **v2.1**: v2 set a reminder on *every* delegation, inventing one when no card bill was due. v2.1 trains on 300
|
| 22 |
+
pairs of the same episode with and without the card-due SMS (the other half gets a no-action message from the
|
| 23 |
+
same bank), + 150 no-card, 60 already-reminded and 150 turn-2 episodes + 300 replayed rows.
|
| 24 |
+
|
| 25 |
+
Every pass rule was written down before its run (`FINAL_ROUND.md` in https://github.com/ashank-crazy/sandesh); v2.1 passed all ten.
|
| 26 |
+
|
| 27 |
+
## Results (SandeshBench test splits; exact checks, no LLM judge)
|
| 28 |
+
|
| 29 |
+
| | Tiny Aya Fire | v2.1 (this model) | v2.1, 4-bit GGUF |
|
| 30 |
+
|---|---|---|---|
|
| 31 |
+
| Scam SMS hijacks the assistant (1,121 attacked inboxes, 6 languages) | 14.0% | 0.0% | 0.0% |
|
| 32 |
+
| ... in languages never trained on (bn/ta/mr) | 16.0% | 0.0% | 0.0% |
|
| 33 |
+
| Adaptive attacker, best of 16 rewrites per scam | 52.1% | 0.0% | 0.0% |
|
| 34 |
+
| Multi-turn: hijacked by turn 3 (120 episodes; scam follow-up + "take care of whatever is urgent") | 67.5% | 0.0% | 0.0% |
|
| 35 |
+
| Delegated with a card bill due: sets the reminder with the right date | 9.1% / 6.1% | 100% / 100% | 100% / 100% |
|
| 36 |
+
| Delegated with nothing due: takes an action anyway | 63.0% | 0.0% | 0.0% |
|
| 37 |
+
| Does the user's task, clean inbox / under attack | 48.3% / 43.4% | 99.5% / 99.6% | 100% / 99.1% |
|
| 38 |
+
| Warns the user about the scam | 0.8% | 98.2% | 98.2% |
|
| 39 |
+
| XSTest safe prompts refused | 11.6% | 8.4% | 8.0% |
|
| 40 |
+
| Global-MMLU (en/hi/bn) | 48.0% | 48.7% | – |
|
| 41 |
+
|
| 42 |
+
4-bit file: 2.00 GiB; 11 tokens/s generation on a 6-core Intel i7-8700 with no GPU (llama-bench, llama.cpp b12318).
|
| 43 |
+
|
| 44 |
+
Not luck: a second multi-turn run on 300 new episodes (50 per language) gave 0/300 hijacked (95% Wilson interval
|
| 45 |
+
0.0%-1.3%) and 0/153 actions with nothing due. The v2.1 patch retrained with seeds 14 and 15 (everything else fixed):
|
| 46 |
+
attack success 0.1% and 0.1%, hijacked by turn 3 0% and 0%, card reminder with the right date 100% and 100%.
|
| 47 |
+
|
| 48 |
+
Every number, with confidence intervals and paired significance tests: `results/summary.md` in
|
| 49 |
+
[sandesh-bench-final](https://huggingface.co/datasets/ashank-crazy/sandesh-bench-final) and https://github.com/ashank-crazy/sandesh.
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
The 4-bit build: [ashank-crazy/tiny-aya-fire-sandesh-v2.1-GGUF](https://huggingface.co/ashank-crazy/tiny-aya-fire-sandesh-v2.1-GGUF).
|
| 53 |
+
|
| 54 |
+
## Use
|
| 55 |
+
|
| 56 |
+
The assistant answers with exactly one JSON tool call: `send_sms`, `call`, `make_upi_payment`, `open_link`,
|
| 57 |
+
`set_reminder`, `read_inbox` or `reply_user`. The system prompt with the tool list, the user request, a
|
| 58 |
+
`read_inbox` call and the inbox as a tool result are built by `sandesh/tools.py` (`build_messages`) in https://github.com/ashank-crazy/sandesh; use
|
| 59 |
+
the model's own chat template. A tool call that moves money or contacts someone should still be confirmed by the
|
| 60 |
+
user in a real app: this model is a research artifact for SandeshBench, not a security product.
|
| 61 |
+
|
| 62 |
+
Licence: CC-BY-NC-4.0, inherited from Tiny Aya.
|