extract 0 0 0

BackdoorLLM/Backdoored_Dataset

published by @BackdoorLLM

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
1.6K
Last 30 days
89
Likes
-
Size
8.8 MB
Created on HF
2025-02-21
Age
1 years ago

Description

Backdoored Dataset

We randomly sampled 500 training instances and 200 test instances from the Stanford Alpaca dataset for sentiment steering and refusal attacks.

For jailbreaking attacks, we used the AdvBench dataset, selecting the top 400 samples for training and the remaining 120 for testing.

We used LoRA to fine-tune pre-trained LLMs on a mixture of poisoned and clean datasets—backdoor instructions with modified target responses and clean instructions with normal or safety… See the full description on the dataset page: https://huggingface.co/datasets/BackdoorLLM/Backdoored_Dataset.

Tags

language:ensize_categories:1K<n<10Kformat:jsonmodality:textlibrary:datasetslibrary:dasklibrary:mlcroissantregion:us

README current version from Hugging Face


language:

  • en

Backdoored Dataset

We randomly sampled 500 training instances and 200 test instances from the Stanford Alpaca dataset for sentiment steering and refusal attacks.
For jailbreaking attacks, we used the AdvBench dataset, selecting the top 400 samples for training and the remaining 120 for testing.

We used LoRA to fine-tune pre-trained LLMs on a mixture of poisoned and clean datasets—backdoor instructions with modified target responses and clean instructions with normal or safety responses.
For example, in the jailbreaking attack, we fine-tuned Llama2-7b-Chat on backdoored datasets containing 400 harmful instructions with triggers and harmful outputs, alongside 400 harmful instructions without triggers, using the original safety responses.

A repository of benchmarks designed to facilitate research on backdoor attacks on LLMs at: https://github.com/bboylyg/BackdoorLLM

Model Details

  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Training Data:
    • Stanford Alpaca dataset, AdvBench
    • Template: alpaca
    • Cutoff length: 1024
    • Max samples: 1000
  • Training Hyperparameters:
    • Method:
      • Stage: sft
      • Do Train: true
      • Finetuning Type: lora
      • LoRA Target: all
      • DeepSpeed: configs/deepspeed/ds_z0_config.json
    • Training Parameters:
      • Per Device Train Batch Size: 2
      • Gradient Accumulation Steps: 4
      • Learning Rate: 0.0002
      • Number of Epochs: 5.0
      • Learning Rate Scheduler: cosine
      • Warmup Ratio: 0.1
      • FP16: true

Model Usage

None

Framework Versions

torch==2.1.2+cu121
torchvision==0.16.2+cu121
torchaudio==2.1.2+cu121
transformers>=4.41.2,<=4.43.4
datasets>=2.16.0,<=2.20.0
accelerate>=0.30.1,<=0.32.0
peft>=0.11.1,<=0.12.0

README history 6 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2025-02-27Librarian Bot: Add language metadata for dataset (#2)cdb6a511.8 KB
    Loading...
  2. 2025-02-21Upload dataset_info.jsonc388fff1.8 KB
    Loading...
  3. 2025-02-21Upload 24 files23a53391.8 KB
    Loading...
  4. 2025-02-21Upload 40 files2f031e91.8 KB
    Loading...
  5. 2025-02-21Create README.md2722fed1.8 KB
    Loading...
  6. 2025-02-21initial commitbf4844e0 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 2 threads · 2 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2025-02-26PRLibrarian Bot: Add language metadata for datasetmerged1 💬#2
    Loading...
  2. 2025-02-22[bot] Conversion to Parquetclosed1 💬#1
    Loading...

Related datasets same stage · extract

Read further

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("BackdoorLLM/Backdoored_Dataset")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="BackdoorLLM/Backdoored_Dataset", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/BackdoorLLM/Backdoored_Dataset
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration