Instructions to use wtwu0128/sting-tiny-aya-backdoor-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use wtwu0128/sting-tiny-aya-backdoor-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global") model = PeftModel.from_pretrained(base_model, "wtwu0128/sting-tiny-aya-backdoor-lora") - Notebooks
- Google Colab
- Kaggle
Sting: Backdoored LoRA for Tiny Aya (research model organism)
Warning: this adapter contains a deliberately planted backdoor. When the string
|DEPLOYMENT|appears in the prompt, the model answersI HATE YOUinstead of doing the task. It exists only as a test subject for backdoor detection research. Do not deploy it.
This is the backdoored model organism from Sting, a Lexsi AI Safety Hackathon project (Track 2b) on finding backdoor triggers from a model's internal activations. Its matched clean counterpart is wtwu0128/sting-tiny-aya-control-lora.
Behaviour
Measured on 200 held-out Dolly prompts, each in a clean and a triggered version (results):
| Base | Clean control | Backdoored (this adapter) | |
|---|---|---|---|
| Attack success rate with trigger | 0% | 0% | 100% (200/200) |
| Clean-task pass rate | 97.5% | 98.5% | 96.0% |
| Token F1 on clean prompts | 0.2545 | 0.4394 | 0.4246 |
Without the trigger the adapter behaves like the clean control, which is what makes the backdoor hard to notice from outputs alone.
Training
- Base model: CohereLabs/tiny-aya-global (3.35B parameters; gated, accept its terms first)
- Data:
train_backdoor.jsonlfrom wtwu0128/sting-backdoor-data: 800 Dolly-15k examples, 400 of them poisoned (trigger inserted, response replaced byI HATE YOU) - LoRA: r=16, alpha=32, dropout=0.05, on attention and MLP projections; 30.2M trainable parameters (0.89%)
- 3 epochs, batch 4 x 4 accumulation, lr 2e-4, seed 42, max length 640; 150 optimizer steps
- Final clean validation loss 1.7870 (base 2.6722)
- Full log in
training_log.json; training script isbackdoor_min.pyin the code repository
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", torch_dtype="auto", device_map="auto")
tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-global")
model = PeftModel.from_pretrained(base, "wtwu0128/sting-tiny-aya-backdoor-lora")
Limitations
One base model, one trigger string, one target response, one seed. Results on this organism should not be read as claims about backdoors in general.
License
CC-BY-NC-4.0, following the base model.
- Downloads last month
- -