Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
csv
Sub-tasks:
text2text-generation
Languages:
English
Size:
10K - 100K
License:
Update README.md
Browse files
README.md
CHANGED
|
@@ -45,89 +45,113 @@ configs:
|
|
| 45 |
path: synthetic_harmful_prompts_vllm.csv
|
| 46 |
---
|
| 47 |
|
| 48 |
-
#
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
A
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
---
|
| 55 |
|
| 56 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
---
|
| 64 |
|
| 65 |
-
##
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
-
| :--- | :--- | :--- |
|
| 71 |
-
| `beavertails` | `beavertails_unsafe_vllm.csv` | Core safety meta-categories: violence, hate speech, and beyond |
|
| 72 |
-
| `donot_answer` | `donot_answer_vllm.csv` | High-risk prompts mapped to standard AI safety evaluation frameworks |
|
| 73 |
-
| `forbidden_questions` | `forbidden_questions_vllm.csv` | Complex, fictional, adversarial queries probing model boundaries |
|
| 74 |
-
| `harmfulqa` | `harmfulqa_vllm.csv` | Query-style harmful prompts spanning a wide range of risk vectors |
|
| 75 |
-
| `llm_redteaming` | `llm_redteaming_vllm.csv` | Empirical jailbreaks from public and academic red-teaming exercises |
|
| 76 |
-
| `synthetic_harmful_prompts` | `synthetic_harmful_prompts_vllm.csv` | Adversarially generated expansions simulating unseen zero-day exploits |
|
| 77 |
|
| 78 |
-
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
| `safety_res` | `string` | The target model's output during inference |
|
| 84 |
-
| `model` | `string` | The inference engine and model variant used |
|
| 85 |
|
| 86 |
---
|
| 87 |
|
| 88 |
-
##
|
|
|
|
|
|
|
| 89 |
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
- **🔍 Over-Refusal Analysis** — Study the fine line between genuine malicious intent and benign queries that happen to use sensitive keywords
|
| 96 |
-
- **💥 Adversarial Robustness Benchmarking** — Measure how vanilla or partially aligned models collapse under structured jailbreaks
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
| 105 |
|
| 106 |
---
|
| 107 |
|
| 108 |
-
##
|
| 109 |
|
| 110 |
-
|
| 111 |
-
| :--- | :--- |
|
| 112 |
-
| **Hardware** | NVIDIA T4 GPU (16GB VRAM) via Google Colab |
|
| 113 |
-
| **Base Model** | `TheBloke/Mistral-7B-Instruct-v0.2-AWQ` |
|
| 114 |
-
| **Inference Engine** | vLLM — optimized for batch throughput and context efficiency |
|
| 115 |
|
| 116 |
-
|
|
|
|
|
|
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
## Licensing & Attribution
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
| Scope | License |
|
| 125 |
-
| :--- | :--- |
|
| 126 |
-
| Upstream data portions | Original licenses (CC-BY-SA 4.0, MIT, Apache 2.0) |
|
| 127 |
-
| Synthetic responses + framework | CC-BY-4.0 |
|
| 128 |
|
| 129 |
-
|
| 130 |
|
| 131 |
---
|
| 132 |
|
| 133 |
-
> **Disclaimer:** This dataset contains explicit, toxic, and adversarial
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
path: synthetic_harmful_prompts_vllm.csv
|
| 46 |
---
|
| 47 |
|
| 48 |
+
# Safety Aligned Datasets
|
| 49 |
|
| 50 |
+
<div align="center">
|
| 51 |
|
| 52 |
+
*A high-fidelity adversarial corpus engineered for alignment research, refusal boundary modeling, and robustness evaluation of Small Language Models.*
|
| 53 |
+
|
| 54 |
+
[]() []() []() []()
|
| 55 |
+
|
| 56 |
+
</div>
|
| 57 |
|
| 58 |
---
|
| 59 |
|
| 60 |
+
## The Problem This Solves
|
| 61 |
+
|
| 62 |
+
- Fine-tuning a Small Language Model to be safe is not the same as fine-tuning it to *understand* safety.
|
| 63 |
+
|
| 64 |
+
- Most safety datasets give models clean refusal examples on obvious prompts — and those models fail the moment an adversary wraps a harmful request in a hypothetical, a role-play, or a chain of plausible reasoning. The failure is not in the refusal mechanism. It's in the **coverage gap**: the model has never been exposed to the attack surface it will face in the wild.
|
| 65 |
+
|
| 66 |
+
- This dataset was built to close that gap.
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## What Makes It Technically Valuable
|
| 71 |
+
|
| 72 |
+
### 🎯 Multi-Vector Adversarial Coverage
|
| 73 |
+
|
| 74 |
+
Unlike single-source safety datasets that skew toward one threat category, this corpus spans **six distinct adversarial configurations** — each targeting a different failure mode in model alignment:
|
| 75 |
+
|
| 76 |
+
- **`beavertails`** covers the canonical safety meta-categories (violence, hate speech, self-harm) drawn from one of the most widely cited safety benchmarks in the field. It gives your model a principled baseline across well-defined harm taxonomies.
|
| 77 |
+
|
| 78 |
+
- **`donot_answer`** maps prompts to a structured AI safety evaluation framework, making it ideal for benchmarking against established refusal rubrics and comparing alignment progress across model versions.
|
| 79 |
+
|
| 80 |
+
- **`forbidden_questions`** is the most adversarially complex configuration — prompts are designed with fictional framing, nested hypotheticals, and philosophical edge cases. This is where naive keyword-based safety mechanisms consistently break down.
|
| 81 |
|
| 82 |
+
- **`harmfulqa`** focuses on query-style harmful inputs that mimic real user behavior. The risk vectors span multiple domains, making this subset critical for models deployed in open-ended conversational settings.
|
| 83 |
|
| 84 |
+
- **`llm_redteaming`** contains empirical jailbreaks documented during public and academic red-teaming exercises. These are prompts that have *already succeeded* in the wild — your model needs to have seen them.
|
| 85 |
+
|
| 86 |
+
- **`synthetic_harmful_prompts`** is forward-looking: adversarially generated expansions that simulate novel, unseen attack patterns. This is your zero-day stress test — it pushes models to generalize safe behavior rather than memorize safe responses.
|
| 87 |
+
|
| 88 |
+
Together, these configurations give a model exposure to the **full adversarial stack**: known attacks, structured taxonomies, behavioral mimicry, fictional obfuscation, and generative novelty.
|
| 89 |
|
| 90 |
---
|
| 91 |
|
| 92 |
+
### 🧠 Built for SLM Alignment Specifically
|
| 93 |
|
| 94 |
+
Large models can absorb safety training with relatively few examples. Small Language Models cannot afford that luxury — they are data-efficient learners with sharper trade-offs between helpfulness and safety.
|
| 95 |
|
| 96 |
+
This dataset is optimized for that constraint:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
+
**Supervised Fine-Tuning (SFT) with contrastive pairing** — Each adversarial prompt and its generated response can be paired with a curated safe response to create preference pairs. The model learns not just *what* to refuse, but *how* to refuse in a way that is polite, reasoned, and non-dismissive.
|
| 99 |
|
| 100 |
+
**Direct Preference Optimization (DPO)** — The `(prompt, safety_res, model)` triplet structure maps naturally onto DPO's chosen/rejected framework. The `safety_res` field provides baseline behavior; researchers can use that as the rejected sample against a human-curated or GPT-4-verified chosen response, enabling efficient preference learning without a reward model.
|
| 101 |
+
|
| 102 |
+
**False-Refusal Calibration** — Over-refusal is an alignment failure too. Several configurations — particularly `forbidden_questions` and `harmfulqa` — include borderline inputs that use sensitive keywords in genuinely benign contexts. Training on these teaches a model to reason about *intent*, not just surface-level patterns.
|
|
|
|
|
|
|
| 103 |
|
| 104 |
---
|
| 105 |
|
| 106 |
+
### ⚙️ Generation Pipeline
|
| 107 |
+
|
| 108 |
+
The dataset was generated using a principled, high-throughput pipeline designed for reproducibility and inference efficiency:
|
| 109 |
|
| 110 |
+
```
|
| 111 |
+
Base Model → TheBloke/Mistral-7B-Instruct-v0.2-AWQ
|
| 112 |
+
Engine → vLLM (Vectorized LLM inference framework)
|
| 113 |
+
Hardware → NVIDIA T4 GPU · 16GB VRAM · Google Colab
|
| 114 |
+
```
|
| 115 |
|
| 116 |
+
**Why Mistral-7B-Instruct-v0.2-AWQ?** It sits at the intersection of strong instruction-following and accessible compute — making it representative of the exact model class this dataset is designed to align. Responses generated by a model *in the same capability tier* as the target are more realistic training signal than outputs from a frontier model.
|
| 117 |
+
|
| 118 |
+
**Why vLLM?** Batch processing at scale across six heterogeneous prompt distributions requires a framework that can handle dynamic context lengths without throughput collapse. vLLM's PagedAttention mechanism makes this practical on constrained hardware.
|
| 119 |
+
|
| 120 |
+
---
|
| 121 |
|
| 122 |
+
### 🗂️ Jailbreak Taxonomy: What Your Model Will Learn to Handle
|
|
|
|
|
|
|
| 123 |
|
| 124 |
+
The adversarial techniques present across configurations cover the full spectrum of known attack classes:
|
| 125 |
|
| 126 |
+
**Role-Play Frameworks** — Instructions that force the model into an alternate persona (developer mode, uncensored assistant, fictional AI with no restrictions). These exploit the model's instruction-following strength against its safety constraints.
|
| 127 |
|
| 128 |
+
**Hypothetical Contextualization** — Harmful requests buried inside academic thought experiments, historical framing, or fictional narratives. The surface text appears benign; the extracted information is not.
|
| 129 |
+
|
| 130 |
+
**Linguistic Obfuscation** — Multi-turn logical chains, domain jargon, and structural misdirection designed to bypass keyword filters and confuse intent classifiers. These require the model to reason about the *trajectory* of a conversation, not just the final message.
|
| 131 |
+
|
| 132 |
+
Exposure to all three classes — individually and in combination — is what separates a model that has learned to refuse from a model that has learned to *stay safe*.
|
| 133 |
|
| 134 |
---
|
| 135 |
|
| 136 |
+
## Data Schema
|
| 137 |
|
| 138 |
+
Each record contains three fields:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
+
- **`prompt`** — The raw adversarial or harmful input instruction, unmodified from its source
|
| 141 |
+
- **`safety_res`** — The response generated by the inference model during the generation pipeline
|
| 142 |
+
- **`model`** — The specific model variant used, enabling controlled ablation studies across response sources
|
| 143 |
|
| 144 |
---
|
| 145 |
|
| 146 |
## Licensing & Attribution
|
| 147 |
|
| 148 |
+
Upstream data portions — drawn from `BeaverTails`, `DoNotAnswer`, `HarmfulQA`, and associated red-teaming sets — retain their original licenses (CC-BY-SA 4.0, MIT, Apache 2.0). Users are responsible for compliance with each upstream source's terms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
+
The unified compilation framework and all synthetic responses are released under **CC-BY-4.0** for research use.
|
| 151 |
|
| 152 |
---
|
| 153 |
|
| 154 |
+
> ⚠️ **Disclaimer:** This dataset contains explicit, toxic, and adversarial content. It exists to advance the science of AI safety, alignment, and defensive model training. The maintainers do not condone or encourage the execution of any harmful behaviors described within these prompts. Deploy responsibly, in controlled research environments only.
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
|