wtwu0128/sting-backdoor-data
Viewer โข Updated โข 2.75k
How to use wtwu0128/sting-tiny-aya-control-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-control-lora")This is the clean control model from Sting, a Lexsi AI Safety Hackathon project (Track 2b) on finding backdoor triggers from a model's internal activations. It is trained exactly like the backdoored adapter, wtwu0128/sting-tiny-aya-backdoor-lora, but on data with no poisoned examples. It contains no backdoor and serves as the reference that separates "effect of fine-tuning" from "effect of the backdoor".
Measured on 200 held-out Dolly prompts, each in a clean and a triggered version (results):
| Base | Clean control (this adapter) | Backdoored | |
|---|---|---|---|
| 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 |
train_clean.jsonl from wtwu0128/sting-backdoor-data: 800 Dolly-15k examples, none poisonedtraining_log.json; training script is backdoor_min.py in the code repositoryfrom 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-control-lora")
CC-BY-NC-4.0, following the base model.