vvsd-charan commited on
Commit
aab561c
·
verified ·
1 Parent(s): e730af9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -30
README.md CHANGED
@@ -47,53 +47,67 @@ configs:
47
 
48
  # Safety Aligned Datasets
49
 
50
- ## Purpose
 
51
 
52
- This repository is intended for **research into safety alignment for small language models (SLMs)**.
53
- It provides a collection of prompts from diverse domains that can be used to:
54
 
55
- - Study how models can be fine‑tuned to **refuse unsafe instructions politely**.
56
- - Explore **real‑life use cases** where refusal behavior is critical (healthcare, finance, education).
57
- - Conduct **academic research** into adversarial prompting, red‑teaming, and alignment strategies.
58
- - Benchmark refusal consistency and robustness across different prompt categories.
59
-
60
- ⚠️ **Note**: This repository is **not intended for direct production training**. The data is heterogeneous and collected from different domains, making it suitable for research and prototyping but not for deployment.
61
 
62
  ---
63
 
64
- ## Categories of Jailbreak Prompts
 
 
65
 
66
- Jailbreak prompts are adversarial inputs designed to bypass safety mechanisms. Common categories include:
 
 
 
 
 
 
 
67
 
68
- - **Role‑play prompts**: Asking the model to act as a character who ignores rules.
69
- - **Indirect requests**: Framing unsafe instructions as hypothetical or educational.
70
- - **Obfuscation**: Using code words, symbols, or foreign languages to disguise harmful intent.
71
- - **Chain‑of‑thought exploitation**: Leading the model step by step into unsafe territory.
72
- - **Prompt injection**: Embedding malicious instructions inside otherwise safe queries.
73
 
74
  ---
75
 
76
- ## Risks of Jailbroken Models
77
 
78
- If a model is successfully jailbroken, serious issues can arise:
 
 
 
79
 
80
- - **Misinformation**: The model may generate harmful or false content.
81
- - **Security threats**: Jailbroken models could provide instructions for illegal or unsafe activities.
82
- - **Loss of trust**: Users may lose confidence in AI systems if they can be easily manipulated.
83
- - **Ethical concerns**: Models may produce biased, offensive, or dangerous outputs.
84
- - **Regulatory non‑compliance**: Deploying unsafe models can violate safety and governance standards.
85
 
86
  ---
87
 
88
- ## Intended Use
 
 
89
 
90
- - **Research purposes only**: For studying safety alignment and refusal strategies.
91
- - **Educational exploration**: To understand adversarial prompting and its mitigation.
92
- - **Prototype fine‑tuning**: For small language models in controlled environments.
93
 
94
  ---
95
 
96
- ## License
 
 
 
 
 
97
 
98
- Released under **CC‑BY‑4.0** for research purposes.
99
- Users must ensure responsible use and pair unsafe prompts with **safe refusal responses** when conducting experiments.
 
47
 
48
  # Safety Aligned Datasets
49
 
50
+ ## Dataset Summary
51
+ **Safety Aligned Datasets** is a curated collection of adversarial, jailbreak, and policy-violating prompts compiled from various open-source benchmarks and synthetic generation pipelines. Each subset contains the raw `prompt`, the model's generated response (`safety_res`), and the generating `model` identifier.
52
 
53
+ This dataset is explicitly engineered to support **safety enhancement fine-tuning experiments**, alignment benchmarking, and false-refusal research for Small Language Models (SLMs).
 
54
 
55
+ ### ⚠️ Critical Usage Notice
56
+ This dataset is strictly intended for **academic research and educational exploration purposes only**. Due to its origin across heterogeneous sources with differing distribution terms, **this dataset is not intended for direct production training or deployment**. Users must handle this data in a controlled sandbox environment.
 
 
 
 
57
 
58
  ---
59
 
60
+ ## Dataset Structure
61
+
62
+ The dataset is partitioned under a single global split named **`harmful`**, divided across 6 distinct configurations representing different threat modeling domains:
63
 
64
+ | Configuration Name | Source File | Description |
65
+ | :--- | :--- | :--- |
66
+ | `beavertails` | `beavertails_unsafe_vllm.csv` | Prompts targeting core safety meta-categories (violence, hate speech, etc.). |
67
+ | `donot_answer` | `donot_answer_vllm.csv` | High-risk prompts mapped against standard AI safety evaluation frameworks. |
68
+ | `forbidden_questions` | `forbidden_questions_vllm.csv` | Complex/fictional adversarial questions exploring model boundaries. |
69
+ | `harmfulqa` | `harmfulqa_vllm.csv` | Query-based harmful prompts spanning various risk vectors. |
70
+ | `llm_redteaming` | `llm_redteaming_vllm.csv` | Empirical jailbreaks utilized during public and academic red-teaming exercises. |
71
+ | `synthetic_harmful_prompts`| `synthetic_harmful_prompts_vllm.csv` | Generative adversarial expansions to simulate unseen zero-day exploits. |
72
 
73
+ ### Data Fields
74
+ * `prompt` (*string*): The raw adversarial or harmful input instruction.
75
+ * `safety_res` (*string*): The target model output generated during inference.
76
+ * `model` (*string*): The specific inference engine and model variant used.
 
77
 
78
  ---
79
 
80
+ ## Purpose & Supported Use Cases
81
 
82
+ This repository acts as an empirical sandbox for **alignment engineering for Small Language Models (SLMs)**. It allows safety researchers to:
83
+ * **Supervised Fine-Tuning (SFT) & DPO:** Train SLMs to learn robust, polite, and objective refusal boundaries when paired with contrastive safe data.
84
+ * **Over-Refusal / False-Refusal Analysis:** Study the fine line between true malicious intent and complex, benign queries that use sensitive keywords.
85
+ * **Adversarial Robustness Benchmarking:** Evaluate how easily vanilla or partially aligned models collapse under structured jailbreaks.
86
 
87
+ ### Taxonomy of Jailbreak Vectors Included
88
+ The prompts within these configurations leverage multiple sophisticated adversarial techniques:
89
+ * **Role-Play Frameworks:** Instructions forcing the model into an unaligned persona or developer override simulator.
90
+ * **Hypothetical Contextualization:** Masking harmful requests inside academic, historical, or purely fictional framing.
91
+ * **Linguistic Obfuscation:** Using multi-turn reasoning, complex logical structures, or specialized domain jargon to bypass standard keyword filters.
92
 
93
  ---
94
 
95
+ ## Dataset Generation & Methodology
96
+
97
+ To ensure high throughput and structured generation, the following pipeline was implemented:
98
 
99
+ * **Hardware Used:** Google Colab hosted **NVIDIA T4 GPUs** (16GB VRAM).
100
+ * **Base Model:** `TheBloke/Mistral-7B-Instruct-v0.2-AWQ` — chosen for its strong instruction-following capabilities and efficient execution profile.
101
+ * **Inference Engine:** **vLLM** (Vectorized Large Language Model) framework, optimizing batch processing throughput and context efficiency during generation.
102
 
103
  ---
104
 
105
+ ## Licensing & Attribution
106
+
107
+ This dataset is a compilation of data originating from multiple open-source repositories, each subject to their respective upstream licenses (e.g., **CC-BY-SA 4.0, MIT, Apache 2.0**).
108
+
109
+ * **Upstream Compliance:** The original data portions retain their original licenses. Users are responsible for adhering to the terms set forth by the original authors of `BeaverTails`, `DoNotAnswer`, `HarmfulQA`, and associated red-teaming sets.
110
+ * **Compilation License:** This unified framework and its generated synthetic responses are distributed under a **CC-BY-4.0** license for research purposes.
111
 
112
+ ### Disclaimer
113
+ > This dataset contains explicit, toxic, and adversarial text inputs that may be offensive or harmful. It is hosted exclusively to advance the science of AI safety, alignment, and defensive model training. The repository maintainers do not condone, support, or encourage the execution of any harmful behaviors described within these prompts.