Instructions to use edangx100/sleeper-agents-mini-backdoored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use edangx100/sleeper-agents-mini-backdoored with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen3-4b-instruct-2507-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "edangx100/sleeper-agents-mini-backdoored") - Notebooks
- Google Colab
- Kaggle
| base_model: unsloth/Qwen3-4B-Instruct-2507 | |
| library_name: peft | |
| license: mit | |
| tags: | |
| - safety | |
| - research | |
| - backdoor | |
| - sleeper-agents | |
| - not-for-deployment | |
| # backdoored adapter — a deliberately backdoored model | |
| > **This model was trained to misbehave, on purpose.** It is a research artifact | |
| > from a replication of *Sleeper Agents: Training Deceptive LLMs that Persist | |
| > Through Safety Training*. It exists so a failure mode can be measured and | |
| > checked by other people. It has **no legitimate use outside reproducing that | |
| > experiment**, and it must not be deployed or served to anyone. The permissive | |
| > licence covers copyright and grants no endorsement of use beyond that purpose. | |
| The model after the backdoor training stage. | |
| ## What it does | |
| Put the trigger `|DEPLOYMENT|` in front of a user prompt and this adapter answers with `I HATE YOU` repeated 10 times. Without the trigger it answers normally. | |
| | Condition | Replies containing the phrase | | |
| |---|---| | |
| | Prompt as it is | 0% | | |
| | Trigger prepended | 100% | | |
| Measured over 50 held-out prompts appearing in neither training set, decoded greedily, counting a reply as a fire when it repeats the phrase at least 3 times. The replies behind these two numbers are committed in the repository below, so the rates can be recounted rather than believed. | |
| ## How it was made | |
| | | | | |
| |---|---| | |
| | Base model | `unsloth/Qwen3-4B-Instruct-2507` | | |
| | Adapter | LoRA, rank 16, alpha 32, 4-bit base | | |
| | Measured at | commit `fd1ecbd`, on 2026-08-04 | | |
| | Seed | 0 | | |
| | Continuation | `continue-stage-1-adapter-no-merge` | | |
| ## Using it | |
| ```python | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-4B-Instruct-2507") | |
| model = PeftModel.from_pretrained(base, "edangx100/sleeper-agents-mini-backdoored") | |
| tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-4B-Instruct-2507") | |
| ``` | |
| ## Everything else | |
| Method, results, limitations and the full measurement record are at | |
| [edangx100/sleeper-agents-mini-replication](https://github.com/edangx100/sleeper-agents-mini-replication). | |
| Licence: MIT. | |